Excel VBA - Error if range doesn't include worksheet name
Posted on 2011-09-21
On my machine, I don't get an error, but on other machines, I get the following error:
"Compile Error: Can't find project or Library"
This error is triggered by range names that don't include the sheetname AND use brackets[ ]
There is no error if range references use the regular old Range("rName") syntax.
Brackets [ ] syntax works OK if the worksheet name precedes the brackets, but this totally defeats the purpose of using brackets, which is to shorten the code.
So.... how do I make it so that my code with range names in brackets will run in all machines without having to type out the sheetname for each rangename reference?