lbrickpe
New member
- Joined
- Nov 3, 2021
- Messages
- 4
- Reaction score
- 0
- Points
- 0
- Age
- 64
- Location
- Knoxville, TN
- Excel Version(s)
- 2016
I have a VBA problem someone may have an answer to.
I have a module, or macro that runs automatically when I open the spreadsheet. This macro refreshes a web query and populates a page with some data from my online database. There are further things which I would like to happen automatically, using this data: one being to save the spreadsheet with a filename built up from the data pulled by the query, and the other being to write a value back to the database.
Both of these things are do-able, and I have macro's for them that work just fine. The problem is that I cannot 'chain' these macros in any manner (I would like to call macro No2 and 3 from the first macro after the query has updated) because the spreadsheet only updates the spreadsheet cells with the retrieved data AFTER the macro finishes running. I am left with having to manually run the 2nd and 3rd macros once I see the spreadsheet cells have been updated.
I have tried sheet refresh commands and the like in the code, but that does not seem to help. Actually, it seems as if the query refresh only happens after the macro ends.
I would appreciate any advice offered!
I have a module, or macro that runs automatically when I open the spreadsheet. This macro refreshes a web query and populates a page with some data from my online database. There are further things which I would like to happen automatically, using this data: one being to save the spreadsheet with a filename built up from the data pulled by the query, and the other being to write a value back to the database.
Both of these things are do-able, and I have macro's for them that work just fine. The problem is that I cannot 'chain' these macros in any manner (I would like to call macro No2 and 3 from the first macro after the query has updated) because the spreadsheet only updates the spreadsheet cells with the retrieved data AFTER the macro finishes running. I am left with having to manually run the 2nd and 3rd macros once I see the spreadsheet cells have been updated.
I have tried sheet refresh commands and the like in the code, but that does not seem to help. Actually, it seems as if the query refresh only happens after the macro ends.
I would appreciate any advice offered!