Hi everyone,
This is a new one on me, I open several files as part of a batch, process data via a macro then save the resulting file. For months this has been working fine, no issues, but in the past few days I have been getting a runtime error 9 when it hits the following line in VBA. None of the coding has been changed at all, it has been static for months.
One clue? If I take the .csv file which is being activated, remove it from the folder it resides in then place it back in the folder then repeat the task by reopening all files then running the macro again it does not fail at the line below, otherwise I get the error. But this is time consuming. Have seen the issue with other files also - but again only very recently. All the files which fail on activation are .csv file and all actioned smoothly until the past few days.
The line it fails with subscript out of range is:
Windows("Website Suppliers.csv").Activate
Any help welcome.
Thanks, Steven
This is a new one on me, I open several files as part of a batch, process data via a macro then save the resulting file. For months this has been working fine, no issues, but in the past few days I have been getting a runtime error 9 when it hits the following line in VBA. None of the coding has been changed at all, it has been static for months.
One clue? If I take the .csv file which is being activated, remove it from the folder it resides in then place it back in the folder then repeat the task by reopening all files then running the macro again it does not fail at the line below, otherwise I get the error. But this is time consuming. Have seen the issue with other files also - but again only very recently. All the files which fail on activation are .csv file and all actioned smoothly until the past few days.
The line it fails with subscript out of range is:
Windows("Website Suppliers.csv").Activate
Any help welcome.
Thanks, Steven