View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
Colo Colo is offline
external usenet poster
 
Posts: 62
Default why error for activate method

Hi Young-Hwan, :)

You need activate Sheets(2) before activate/select the Range of Sheets(2).
So the code would be...

'--CODE--
Sheets(2).Select
Range("A1").Select 'Activate
'--

Or simply you can use this one.

'--CODE--
Application.Goto Sheets(2).Range("A1")
'--


--
Kind Regards
Colo
/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/
Colo of 'The Road of The Cell Masters' :)

URL:http://www.interq.or.jp/sun/puremis/...astersLink.htm


/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/


"Young-Hwan Choi" wrote in message
...
Current activesheet is sheets(1).

Sheets(2).Range("A1").Activate

The code above gives an error saying that
Run time error:1004
Activate method of range class failed.

The "activate" method works fine when I am in the same worksheet.
Say, when I am in sheets(2) and use Sheets(2).Range("A1").Activate, then

it
works.
(None of the sheets is chartsheet.)

Is it normal? I thought it worked fine....