Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Hide Sheet If....
Hi All,
As part of a greater routine, I'd like to Hide a worksheet if a certain condition exists in a cell located on a different sheet. For example, If: Sheet1!A1 = TRUE, Hide Sheet2. Any help is appreciated. |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Hide Sheet If....
Use the calculate event to check the cell or if the cell would be changed
through manual entry, then use the change event. There is no function you can place in a cell to perform this type of action. http://www.cpearson.com/excel/events.htm Chip Pearson's page on events. -- Regards, Tom Ogilvy "JPAUL" wrote in message ... Hi All, As part of a greater routine, I'd like to Hide a worksheet if a certain condition exists in a cell located on a different sheet. For example, If: Sheet1!A1 = TRUE, Hide Sheet2. Any help is appreciated. |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Hide Sheet If....
Hi JPaul
You can use the following Sub HideMySheet If Sheets("Sheet1").Range("A1") = "good" Then Sheets("sheet3").Visible = False Else Sheets("sheet3").Visible = True End If End Sub Thanks Greg -----Original Message----- Hi All, As part of a greater routine, I'd like to Hide a worksheet if a certain condition exists in a cell located on a different sheet. For example, If: Sheet1!A1 = TRUE, Hide Sheet2. Any help is appreciated. . |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
Hide Sheet If....
Missed you part of a greater routine.
if range("Sheet1!A1").Value then worksheets("Sheet2").Visible = xlSheetHidden or if A1 of sheet1 will always be true or false Worksheets("Sheet2").Visible = Not Range("Sheet1!A1") -- Regards, Tom Ogilvy "Tom Ogilvy" wrote in message ... Use the calculate event to check the cell or if the cell would be changed through manual entry, then use the change event. There is no function you can place in a cell to perform this type of action. http://www.cpearson.com/excel/events.htm Chip Pearson's page on events. -- Regards, Tom Ogilvy "JPAUL" wrote in message ... Hi All, As part of a greater routine, I'd like to Hide a worksheet if a certain condition exists in a cell located on a different sheet. For example, If: Sheet1!A1 = TRUE, Hide Sheet2. Any help is appreciated. |
#5
Posted to microsoft.public.excel.programming
|
|||
|
|||
Hide Sheet If....
Thanks for your response. Unfortunately, I get a "Type
Mismatch" error for: If Sheets("ASP").Range("AE46") = "TRUE" Then Sheets(" Scorecard").Visible = False Else: Sheets(" Scorecard").Visible = True End If -----Original Message----- Hi JPaul You can use the following Sub HideMySheet If Sheets("Sheet1").Range("A1") = "good" Then Sheets("sheet3").Visible = False Else Sheets("sheet3").Visible = True End If End Sub Thanks Greg -----Original Message----- Hi All, As part of a greater routine, I'd like to Hide a worksheet if a certain condition exists in a cell located on a different sheet. For example, If: Sheet1!A1 = TRUE, Hide Sheet2. Any help is appreciated. . . |
#6
Posted to microsoft.public.excel.programming
|
|||
|
|||
Hide Sheet If....
If Sheets("ASP").Range("AE46").Text = "TRUE" Then
or If Sheets("ASP").Range("AE46")Value = TRUE Then -- Regards, Tom Ogilvy "JP" wrote in message ... Thanks for your response. Unfortunately, I get a "Type Mismatch" error for: If Sheets("ASP").Range("AE46") = "TRUE" Then Sheets(" Scorecard").Visible = False Else: Sheets(" Scorecard").Visible = True End If -----Original Message----- Hi JPaul You can use the following Sub HideMySheet If Sheets("Sheet1").Range("A1") = "good" Then Sheets("sheet3").Visible = False Else Sheets("sheet3").Visible = True End If End Sub Thanks Greg -----Original Message----- Hi All, As part of a greater routine, I'd like to Hide a worksheet if a certain condition exists in a cell located on a different sheet. For example, If: Sheet1!A1 = TRUE, Hide Sheet2. Any help is appreciated. . . |
#7
Posted to microsoft.public.excel.programming
|
|||
|
|||
Hide Sheet If....
Success! Thanks.
-----Original Message----- If Sheets("ASP").Range("AE46").Text = "TRUE" Then or If Sheets("ASP").Range("AE46")Value = TRUE Then -- Regards, Tom Ogilvy "JP" wrote in message ... Thanks for your response. Unfortunately, I get a "Type Mismatch" error for: If Sheets("ASP").Range("AE46") = "TRUE" Then Sheets(" Scorecard").Visible = False Else: Sheets(" Scorecard").Visible = True End If -----Original Message----- Hi JPaul You can use the following Sub HideMySheet If Sheets("Sheet1").Range("A1") = "good" Then Sheets("sheet3").Visible = False Else Sheets("sheet3").Visible = True End If End Sub Thanks Greg -----Original Message----- Hi All, As part of a greater routine, I'd like to Hide a worksheet if a certain condition exists in a cell located on a different sheet. For example, If: Sheet1!A1 = TRUE, Hide Sheet2. Any help is appreciated. . . . |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Create Sheet, Hide Sheet | Excel Discussion (Misc queries) | |||
hide sheet | Excel Programming | |||
hide sheet tab | Excel Programming | |||
hide sheet? uncheck sheet tabs? or ??? | Excel Programming | |||
Hide Sheet | Excel Programming |