Page 1 of 1

Notation of excel range in VBA

Posted: June 18th, 2007, 9:06 am
by FangYi
Hi, sorry for this stupid question, please this is serious to me!There's a simple way to note an excel range in VBA, that is to put [] around the range name, for example:[RangeN] instead of range("RangeN").I have always been using this notation, but recently I've changed machine and it doesn't work anymore, I suppose that I should turn on a certain option to enable this.... would you please tell me how?Many thanks!

Notation of excel range in VBA

Posted: June 19th, 2007, 10:45 am
by adcockj
There is no switch but the method does fail if there is a VBA variable with the same name in scope, so trying to do things likeSet RangeN = [RangeN] doesn't work, but Set myRangeN = [RangeN] does.John