Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
hide sheet
I have two sheets, X and Y within a workbook. I need help
with VBA code for the following scenario: The active sheet is Y. When I click on Sheet X I want to automatically hide sheet Y. |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
hide sheet
Hi Jeff,
Private Sub Workbook_SheetDeactivate(ByVal Sh As Object) If Sh.Name = "Y" Then Sh.Visible = xlSheetHidden End If End Sub 'This is workbok event code, which means that it needs to be 'placed in the ThisWorkbook code module, not a standard 'code module. To do this, right-click on the Excel icon at the top 'left of the Excel spreadsheet, select the View Code option from 'the menu, and paste the code in. -- HTH Bob Phillips ... looking out across Poole Harbour to the Purbecks (remove nothere from the email address if mailing direct) "Jeff" wrote in message ... I have two sheets, X and Y within a workbook. I need help with VBA code for the following scenario: The active sheet is Y. When I click on Sheet X I want to automatically hide sheet Y. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Create Sheet, Hide Sheet | Excel Discussion (Misc queries) | |||
How do I hide a sheet, that others will not be able to see it? | Excel Worksheet Functions | |||
hide sheet | Excel Discussion (Misc queries) | |||
hide sheet tab | Excel Programming | |||
hide sheet? uncheck sheet tabs? or ??? | Excel Programming |