Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Opening Dynamic Linked Excel files
Message
From
24/10/2006 18:36:08
 
 
To
24/10/2006 17:55:48
General information
Forum:
Visual FoxPro
Category:
COM/DCOM and OLE Automation
Miscellaneous
Thread ID:
01163755
Message ID:
01164227
Views:
12
Thanks for the clarification.
Absolutely, you will have to create a timer if the sheet is active. That code will work only when the file is open.
You are on the right track. Let me know if you need help w/that.
Good luck


>>I’m having a hard time understanding how you are doing this. With automation you should not have any file sharing errors
>>But in any case, if you Have to user a macro, you can do something like this:
>>
>>
>>Private Sub Workbook_Open()
>>ActiveWorkbook.SaveAs Filename:="c:\temp\MyFile"
>>End Sub
>>
>>
>>>Thanks Yuri!
>>>I appreciate the response. I am unable to use automation as the workbook gives me a file share error. So, COPY may be the only way to go. The only issue now is, I need to manually run out to the machine and press save on the open workbook. I just need some kind of macro to set up with Excel to Auto Save. Any suggestions?
>
>Thanks Ed and Yuri,
>
>Hopefully this will explain:
>The Excel Workbook is open 24/7 out on the factory floor.
>There is an application that runs on the same machine that holds the open workbook and constantly checks the up time of equipment on the floor. Monitoring when the machinery was down for any length of time.
>
>Every 12 hours the application updates the workbook. When that happens the cells update with new values and a temp file with a .XAR extension is created. It's as if someone was typing in the workbook and Excel created an auto restore file.(Not saved at this time.)
>
>The issue is that when I attempt to open the Excel activeworkbook via automation I receive a messagebox from the Workbook object that states: "Remote data not accessible. Start Application (Application name here)?"
>
>It's a strict rule not to have multiple instances of the application... And no one has told me why. ("Do any thing you want, just don't pwess the wed button. No! No! Not the wed one!") -Bugs Bunny Reference
>
>If I say no to starting the application, I receive HREF cell values.
>The screen out on the floor is accurate and up to date but, the working file is showing date modified as the last time the workbook was saved.
>
>If I COPY FILE without going out to the factory and manually pressing save on the open EXcel file, I pull in data from the last time the file was saved manually.
>If I press save and then do the COPY FILE it all works as intended.
>
>So.. With Edgar's macro, I should be able to keep the information rolling into a foxpro dbf without running out to the shop floor all the time to save then come up and run my app.
>
>Because the workbook is already open, do I need the sub Workbook_Open() code?
>Or, do I just set some kind of timer up and every 720 minutes run:
>ActiveWorkbook.SaveAs Filename:="c:\temp\MyFile"
>
>Thanks for the macro.
>
>Hope that clarifies things a little.
Previous
Reply
Map
View

Click here to load this message in the networking platform