4,375 questions
Try Range(lookupref) instead of Range("lookupref").
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
I'm using the indirect function in a range.select statement in VBA for excel:
Range("lookupref").Select
Where lookupref is a string that evaluates (for testing purposes) to B2
[I'm using a msgBox to show me what the value is]
I keep getting an error :
Run-time error '1004':
Method 'Range' of object '_global' failed
not sure what this means - I'm fairly new to VBA and working through errors as they arise, but this one has me stumped. Any suggestions?
Try Range(lookupref) instead of Range("lookupref").