Issue with an inherited Excel Macro - where original conditions have changed ...
The current workbook imports a handful of *.csv where each .csv gets it's own worksheet.. There is a master sheet that already exists that is designed to pull in the data from these separate or individual worksheets after the fact...
However do to a change in process has resulted in a variation of the *.csv file names .. So now when the script runs to pull in data if the worksheet doesn't exist - it pops open a explorer box to find a document... Ack
This is the script
...
The files used to be just "Batch" and there used to always be 4 of them, However, the total number has changes - up to 16 different types, where not all the files in the range get delivered on occasion
Batch1a_GETS
Batch1b_GETS
Batch2a_GETS
Batch2b_GETS
down thru Batch8b_GETS....
(basically 1-8, each with an A & B in the name)
The issue that depending how program is run that generates the *.csv files are run it's possible get Batch 1 thru 4 or just Odd numbers - or some odd combination, I don't always get ALL the files referenced in the macro... The problem is that if say Batch2 doesn't exist (ie both Batch2a_GETS & Batch2b_GETS - it attempts to open a file dialog box..
I've been working on trying to do some equivalent of if not exist or to loop the separate commands (since the R1C1 now) - so that it won't choke if the files doesn't exist - but am stuck
Bookmarks