Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
Hi,
I made assign macro in sheet 1 which is linked to sheet 2. Whenever I hide sheet 2, It wont works and says : run-time error '1004' select method of worksheet class failed. Then it will open VBS array with yellow mark status need to be edited or something. How can I solve this problem? Much Appreciate, Pran |
#2
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
Hi,
Instead of Sheets("Sheet2").Select use Sheets("Sheet2").Activate If this fails then you should enter the appropriate line in the procedure to unhide the sheet, run your code and re-hide the sheet when the code has completed Alan -- Message posted via http://www.officekb.com |
#3
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
Yes, So far it works !!!
One more question is, if I now protect the sheet with password, then is there any additional array that I should make? Many thx for your help, Pran "Alan McQuaid via OfficeKB.com" wrote: Hi, Instead of Sheets("Sheet2").Select use Sheets("Sheet2").Activate If this fails then you should enter the appropriate line in the procedure to unhide the sheet, run your code and re-hide the sheet when the code has completed Alan -- Message posted via http://www.officekb.com |
#4
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
What are you doing to Sheet2 that needs it to be selected?
Generally Sheets do not have to be selected to work upon them. Post the code for review. Gord Dibben MS Excel MVP On Fri, 24 Jul 2009 00:16:02 -0700, Pran wrote: Hi, I made assign macro in sheet 1 which is linked to sheet 2. Whenever I hide sheet 2, It wont works and says : run-time error '1004' select method of worksheet class failed. Then it will open VBS array with yellow mark status need to be edited or something. How can I solve this problem? Much Appreciate, Pran |
#5
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
Sub Corporate_Deed()
' ' Corporate_Deed Macro ' ' Sheets("A. CORPORATE DEED").Select Range("B3").Select End Sub Sub Home() ' ' Home Macro ' ' Sheets("MAIN PAGE").Select Range("B2:G2").Select End Sub I should correct previous email, it doesnt work, coz it is linked to another visible sheet 3, rather than hidden sheet 2. How can I enter appropriate line? Regards, "Gord Dibben" wrote: What are you doing to Sheet2 that needs it to be selected? Generally Sheets do not have to be selected to work upon them. Post the code for review. Gord Dibben MS Excel MVP On Fri, 24 Jul 2009 00:16:02 -0700, Pran wrote: Hi, I made assign macro in sheet 1 which is linked to sheet 2. Whenever I hide sheet 2, It wont works and says : run-time error '1004' select method of worksheet class failed. Then it will open VBS array with yellow mark status need to be edited or something. How can I solve this problem? Much Appreciate, Pran |
#6
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
Gord's question was why are you selecting anything on that hidden sheet?
There's really not too many things that require that you select anything before working on it. But if you want to select a range, you're going to have to make that sheet visible first: With worksheets("A. CORPORATE DEED") .visible = xlsheetvisible .range("b3").select End with Pran wrote: Sub Corporate_Deed() ' ' Corporate_Deed Macro ' ' Sheets("A. CORPORATE DEED").Select Range("B3").Select End Sub Sub Home() ' ' Home Macro ' ' Sheets("MAIN PAGE").Select Range("B2:G2").Select End Sub I should correct previous email, it doesnt work, coz it is linked to another visible sheet 3, rather than hidden sheet 2. How can I enter appropriate line? Regards, "Gord Dibben" wrote: What are you doing to Sheet2 that needs it to be selected? Generally Sheets do not have to be selected to work upon them. Post the code for review. Gord Dibben MS Excel MVP On Fri, 24 Jul 2009 00:16:02 -0700, Pran wrote: Hi, I made assign macro in sheet 1 which is linked to sheet 2. Whenever I hide sheet 2, It wont works and says : run-time error '1004' select method of worksheet class failed. Then it will open VBS array with yellow mark status need to be edited or something. How can I solve this problem? Much Appreciate, Pran -- Dave Peterson |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Macro to run on hidden sheet | Excel Discussion (Misc queries) | |||
Using a Macro to look at Hidden Sheet | Excel Discussion (Misc queries) | |||
Macro Error When Connecting to Hidden Sheet | Excel Discussion (Misc queries) | |||
I need my Hidden Rows to stay hidden when I print the sheet. | Excel Discussion (Misc queries) | |||
Can a macro format a hidden sheet? | Excel Discussion (Misc queries) |