R Randal Jul 1, 2004 #1 Why does this work in a macro but not in the code for a button? "Range("B3:C3").Select"
R Randal Jul 1, 2004 #3 Excel 2000 (9.0.6926 SP-3) Ron de Bruin said: Hi Randal Do you use Excel 97? -- Regards Ron de Bruin http://www.rondebruin.nl "Randal" <rlwnrAThighstream.net> wrote in message news:[email protected]... Click to expand...
Excel 2000 (9.0.6926 SP-3) Ron de Bruin said: Hi Randal Do you use Excel 97? -- Regards Ron de Bruin http://www.rondebruin.nl "Randal" <rlwnrAThighstream.net> wrote in message news:[email protected]... Click to expand...
D Dave Peterson Jul 1, 2004 #5 I'm betting that you changed worksheets: Try something like: with worksheets("othersheet") .select .range("b3:c3").select .... If your code is for a command button from the controltoolbox tooblar on a worksheet: Then unqualified refences like the range refence in this example: worksheets("othersheet").select range("b3:c3").select will refer to the worksheet that holds the code. (The same code in a general module will use the activesheet.) And you usually don't have to select the range before you do something with it. Maybe just work on that range directly???
I'm betting that you changed worksheets: Try something like: with worksheets("othersheet") .select .range("b3:c3").select .... If your code is for a command button from the controltoolbox tooblar on a worksheet: Then unqualified refences like the range refence in this example: worksheets("othersheet").select range("b3:c3").select will refer to the worksheet that holds the code. (The same code in a general module will use the activesheet.) And you usually don't have to select the range before you do something with it. Maybe just work on that range directly???