Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 262
Default how can I unhide/hide a sheet based on pull down selection?

I would like to know how you can make one of several hidden worksheets
visible based on a pull down selection on a visible worksheet.
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 22,906
Default how can I unhide/hide a sheet based on pull down selection?

With a DV dropdown list of sheets in D1 of an always visible sheet.

Private Sub Worksheet_Change(ByVal Target As Range)
If Intersect(Target, Me.Range("D1")) Is Nothing Then Exit Sub
On Error GoTo endit
With Application
.EnableEvents = False
.ScreenUpdating = False
End With
With Sheets(Target.Value)
If .Visible = False Then
.Visible = True
Else
.Visible = False
End If
End With
endit:
With Application
.ScreenUpdating = True
.EnableEvents = True
End With
End Sub

This is sheet event code. Right-click on the sheet tab and "View Code"

Copy/paste the code into that sheet module.

Adjust target range to suit.

Alt + q to return to the Excel window.


Gord Dibben MS Excel MVP


On Mon, 11 Aug 2008 18:40:09 -0700, Keith
wrote:

I would like to know how you can make one of several hidden worksheets
visible based on a pull down selection on a visible worksheet.


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
Hide/Unhide after protect sheet RKS Excel Discussion (Misc queries) 0 March 21st 08 05:03 AM
How to hide/unhide a sheet? Arup C[_2_] Excel Discussion (Misc queries) 1 October 23rd 07 12:16 PM
Hide or unhide sheets based on cell billinr Excel Discussion (Misc queries) 2 July 13th 07 07:42 PM
Hide row(s) based on drop down selection Maritza Excel Discussion (Misc queries) 6 March 12th 07 09:56 PM
Macro to hide and unhide based on criteria [email protected] Excel Discussion (Misc queries) 1 June 5th 06 08:05 PM


All times are GMT +1. The time now is 02:20 AM.

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

About Us

"It's about Microsoft Excel"