why error for activate method

  • Thread starter Thread starter Young-Hwan Choi
  • Start date Start date
Y

Young-Hwan Choi

Hi. colo.

For some reason, I thought the code had been worked fine.
After I went over my previous macros, I realized, strange enlugh, that this
was the first time I used this type of a code. And, I still don't understand
why it's not possible. It's pretty simple...

Anyway, I really appreciate your explanation and the Goto code.

thank you.

regards,
 
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....
 
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/colo/CellMastersLink.htm
mailto:[email protected]

/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/
 
Back
Top