View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.programming
CLR CLR is offline
external usenet poster
 
Posts: 1,998
Default Worksheets("MyName").select

True Tom.....LOL, but I spent a couple hours anguishing over that problem
before asking, and then it went so well with the "right" answer.......I just
love it when a plan comes together......I'd be in a heap of doo-doo with out
the help I get here.

Vaya con Dios,
Chuck, CABGx3







"Tom Ogilvy" wrote:

Not as exciting when you hear it the 3rd time <g

--
Regards,
Tom Ogilvy


"CLR" wrote:

Got it...........thanks Nick

Vaya con Dios,
Chuck, CABGx3



"Nick" wrote:

On May 18, 11:07 am, CLR wrote:
Hi All........

Having trouble here with the lines of code

Worksheets("MyName").select
and
Copy Destination:=Worksheets("MyName").Range("A1")

where MyName is a variable, declared and set earlier.......I get "Runtime
error 9, Subscript out of range" error and macro won't pass that point.

How else might I be able to refer to that sheet whose name changes as the
macro goes along.......

TIA
Vaya con Dios,
Chuck, CABGx3

Dont use quotes