I have an excel spreedsheet that gets external data through query. I need a way to refresh this data on a daily basis automatically, without human intervention. Can someone help me with this? Thanks in advance.
It sounds like ETID is assuming you're query is an Access query.
Actually, I think this will require VBA code and I'm not sure if the VBA code will run unless the file is opened. However, if we get the code, perhaps you could put the file in your startup folder so that it is opened automatically when the PC is turned on.
Then, the VBA code would have the setting to update at a specific time or on open of the file. This depends on you. When would you like the data refreshed?
techsupportgirl@home.com
What I was wanting to do is have the data refresh each night around 8pm when noone is around. I'm an AS/400 programmer and trying to manipulate data in excell is new to me. But, the idea i had was to create a macro that opens and closes the file. Then if I could run this macro in a batch file I could schedule it to run at a certain time at night. Is this possible? Or is there a better way to accomplish it? Thanks.
A macro won't open the file. You'll need a VB or other program to do that.
Running the macro on open would then work. Or, you can (I'm almost certain) set a special time for it to update. Though you could probably just do it on open and have the VB or other program open it at the given time.
Check with the VBers forum, if you like. I'm not any good at it, though I do own it.
techsupportgirl@home.com
If you can start an excel spreadsheet from your batch,...you can set a macro in that workbook to run on start up, and by the way, I too query agains as400 files using the client access odbc driver and it will link and refresh on opening of the spreadsheet.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.