Title says it all.
I've got an excel which autorefreshes every 10 minutes,with new data imported.I've made a macro that saves old data once new one is imported.
But,if i have another excel file opened at the moment of the autorefresh,macro module is going to stop executing,thus not saving old data from web query that is autorefreshing.
This is the module in question:
Formula:Please Login or Register to view this content.
Debugger highlights the part when module selects Q1 range
I'm guessing that the thing that happens is that,once module gets to "select Q1" part,it tries to select it in active workbook,and not the workbook that contains that code.
So,if i got some other excel file opened,that is not related to autorefreshed one,its gonna try to copy data from autorefreshed excel onto that new excel.
HOw could i fix it?
I beleive i need some method of telling macro that he should seek Q1 in that specific workbook,rather than active one.
But,alas,i'm not good with coding,so help is needed(and appreciated)
Thanks in advance
Bookmarks