Davealot
Member
Greetings,
Needing some perspective if possible. I have an excel spreadsheet that has powerqueries running in it from an Access Database. I'm trying to write a macro that will refresh all data, then once that is done to save the file.
So I started off with:
activeworkbook.refreshall
thisworkbook.save
That cancels the data refresh because it goes straight to saving the file. So I split it into two separate subs, and at the end of the refreshall sub I just called the save sub, still doesn't work. Is there a way to set it, where it doesn't lock the workbook where it's something like:
activeworkbook.refreshall
Wait ten seconds
thisworkbook.save
Not sure how to make this happen, any ideas are greatly appreciated!
Needing some perspective if possible. I have an excel spreadsheet that has powerqueries running in it from an Access Database. I'm trying to write a macro that will refresh all data, then once that is done to save the file.
So I started off with:
activeworkbook.refreshall
thisworkbook.save
That cancels the data refresh because it goes straight to saving the file. So I split it into two separate subs, and at the end of the refreshall sub I just called the save sub, still doesn't work. Is there a way to set it, where it doesn't lock the workbook where it's something like:
activeworkbook.refreshall
Wait ten seconds
thisworkbook.save
Not sure how to make this happen, any ideas are greatly appreciated!