Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
SaveAs method error | Excel Discussion (Misc queries) | |||
Paste method error in macro | Excel Discussion (Misc queries) | |||
PasteSpecial Method Error | Excel Discussion (Misc queries) | |||
Activate method of Worksheet class fails in Excel 2000 | Excel Discussion (Misc queries) | |||
Unprotect method run-time error | Excel Programming |