Hi,
I have a macro that opens and modifies a lot of different files. Currently the only way I can make this work is by using a lot of Application.OnTime commands, which is making the code extremely unwieldly.
for some background, the reason I do this is as follows (simplified):
I Start with a template that I input data on, then execute the Macro.
The code goes like this
If I try to run the code like that however, it gets an error when trying to modify the downloaded file, because it doesn't recognize that the file has been opened, a subscript out of range error. (if i run through line by line the code works because the system processes that the file has been opened)
so what I ended up doing is this:
This works, but is making it very hard to keep track of everything since it cant all be called in one sub.
My googling makes it seem like I should be able to do what follows, but it doesn't work.
Am I misinterpreting what DoEvents does / is there any alternative to get something like this?
Any advice is much appreciated.
Bookmarks