View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Andibevan[_4_] Andibevan[_4_] is offline
external usenet poster
 
Posts: 103
Default Easy Question about selecting Ranges

Many thanks

"Tom Ogilvy" wrote in message
...
You can only select on the activesheet.

An alternative approach
Sheets("Worksheet 1").Select
Range("A8").Select

if the workbook is not active

Workbooks("MyBook.xls").Select
Sheets("Worksheet 1").Select
Range("A8").Select

if you execute the code from within a class module such as a sheet module

or
the thisworkbook module
Workbooks("MyBook.xls").Select
Workbooks("MyBook.xls").Sheets("Worksheet 1").Select
Workbooks("MyBook.xls").Sheets("Worksheet 1").Range("A8").Select

as any unqualified references will be qualified with the sheet or workbook
associated with that module.

--
Regards,
Tom Ogilvy


"Andibevan" wrote in message
...
Hi All,

This is a really basic question that I can't work out.

Why can't I use sheets("Worksheet 1").Range("A8").Select to select a

range
on another worksheet?

And am I correct in thinking the only way to do it is:-

Application.Goto Activeworkbook.Sheets("Worksheet 1").Range("A8")

Thanks in advance

Andi