Hello, I'm trying to setup a project so that all FILE UNIQUE constants are located in a "Global" module (for one-spot for an excel administrator to maintain) and declared as Public, and then used elsewhere in the project. The COUNT of these 'DataSheet' constants will vary from file to file (anywhere from 1 - ~15); and the NAMES of these Sheets follow NO particular structure whatsoever, could be any sort of name.
I'm looking for code that will convert a string into a variable so to use in a For/Next loop to accommodate this variation in COUNT #. Bad thing is that the line "Applicaton.Sheets("DataSheet" & i).EnableCalculation" below faults.
I'm looking for something kind of like the INDIRECT worksheet function. Does anything like that exist in VBA.
If there is no way to do this, then another way would be to build-up an array in a SUB in the Global module. So, administrator would only have to go to this SUB and tweak this SUB for the various files. Is this the only way to do what I want???
Please Login or Register to view this content.
Bookmarks