Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
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?



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Select Method from Combo Box bw Excel Programming 6 August 25th 05 11:47 PM
Select Method Failing cmk18[_8_] Excel Programming 2 July 11th 05 11:53 PM
Select Folder - Simples Method Andibevan[_2_] Excel Programming 1 June 30th 05 02:09 PM
Select Method of Sheets Brenda Meza via OfficeKB.com Excel Programming 2 May 20th 05 12:37 AM
Help with Select Case or Best Method Christina[_4_] Excel Programming 1 November 5th 03 06:15 PM


All times are GMT +1. The time now is 10:07 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"