View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.programming
Robert Christie[_3_] Robert Christie[_3_] is offline
external usenet poster
 
Posts: 117
Default activating correct worksheet

Hi Tom & Peter

Just replaced the Line "Worksheets("Names").Activate" with
"Sheets("Names").Select" and it selects "Names" wether Names worksheet is
ActiveSheet or not.
Strange very strange.

Thank you both for your posts.

Regards Aussie Bob C.

"Tom Ogilvy" wrote:

? activesheet.Name
Sheet2
Worksheets("Sheet2").Activate

in the immediate window did not raise any error. What you say is very
strange.

--
Regards,
Tom Ogilvy

"Robert Christie" wrote in message
...
Hi

The code Worksheets("Names").Activate or Select brings up "error 9

Subscript
out of range" if sitting in the "Names" Worksheet, but will activate if
sitting in any other sheet, why?
What am I missing?
I just want to be sure the Formatting sub procedure called up runs on the
correct sheet.

TIA

--
Thank you

Regards
Aussie Bob C.
Using Windows XP Home + Office 2003 Pro