Thread: select method
View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Chip Pearson Chip Pearson is offline
external usenet poster
 
Posts: 7,247
Default select method

You can't Select a cell on a sheet that is not active. However,
you can use Application.Goto to do the same thing.

Application.Goto
workbooks("olddesign.xls").Worksheets("s1").range( "a1")
Selection.Value = 123

That said, it is almost never necessary to Select a cell, and
doing so is an expensive operation. Instead, just use the range
directly.

workbooks("olddesign.xls").Worksheets("s1").range( "a1").Value =
123


--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com


"R..VENKATARAMAN" wrote in message
...
windows(1).worksheets("s1").range("a1").select
workbooks("olddesign.xls").Worksheets("s1").range( "a1").select
Neither of the above works one gives the error
"object does not support or method"
and other gives the error
"select method or range class failed"
I have to use
windows(1).activate
worksheets("s1").activate
range("a1").select


why? Where do I go wrong?