Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 17
Default why error for activate method

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,


"Colo" wrote in message
...
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....






  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 17
Default why error for activate method

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....



  #3   Report Post  
Posted to microsoft.public.excel.programming
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....




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
SaveAs method error Horatio J. Bilge, Jr. Excel Discussion (Misc queries) 3 October 6th 09 09:05 PM
Paste method error in macro bwilk77 Excel Discussion (Misc queries) 2 October 25th 07 09:21 PM
PasteSpecial Method Error PW11111 Excel Discussion (Misc queries) 1 December 19th 06 01:24 PM
Activate method of Worksheet class fails in Excel 2000 Chris Bloom Excel Discussion (Misc queries) 3 September 10th 05 12:05 AM
Unprotect method run-time error Rohit Thomas Excel Programming 0 July 8th 03 07:32 PM


All times are GMT +1. The time now is 11:45 PM.

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

About Us

"It's about Microsoft Excel"