LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 211
Default dropdown unhide sheet

Hello I have hidden 19 worksheets . Using a new worksheet, I Created a
form and on cell B28 I have a dropdown list naming the19 differend kinds of
agreements. What I want is when the agreement name is selected on cell B 28
for that worksheet to unhide.
This is my code(so far)
Private Sub Worksheet_Change(ByVal Target As Range)
With Target

If Me.Range("B28").Value = "" Then
Worksheets("StandardAgreement").Visible = xlSheetVeryHidden
Else
Worksheets("StandardAgreement").Visible = xlSheetVisible
End If
End With

The above code works ...the next agreement on the list is 3 year Agreement
..so I added the following to the code above


If Me.Range("B28").Value = "" Then
Worksheets("3YearAgreement").Visible = xlSheetVeryHidden
Else
Worksheets("3YearAgreement").Visible = xlSheetVisible

End If
End If

End With
This does not work, How can I add all 19 agreements to the code so that the
whatever agreement is selected in cell B28 the worksheet unhides
thanks for helping me!

 
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
macro to unhide a sheet Bill_S Excel Discussion (Misc queries) 1 April 10th 08 05:27 PM
How to hide/unhide a sheet? Arup C[_2_] Excel Discussion (Misc queries) 1 October 23rd 07 12:16 PM
HELP!! Unhide Sheet with Macro and focus on other sheet [email protected] Excel Discussion (Misc queries) 2 May 23rd 06 07:17 PM
Can't see sheet, and have tried unhide, etc? Anna Excel Worksheet Functions 2 April 4th 06 05:27 PM
adding data from one sheet to another sheet as a dropdown list bo. gatorguy Excel Discussion (Misc queries) 1 February 18th 05 10:51 PM


All times are GMT +1. The time now is 08:23 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"