Home |
Search |
Today's Posts |
|
#1
![]() |
|||
|
|||
![]()
Thanks Chris/Gord,
I looked at your code Chris and made a few changes - works perfectly. I had a look at Gord's code which was interesting - something I can use in another file. I like the use if a dialog box, something I haven't used before. Thanks again guys. Sub OpenSheets() Dim OpenSheet As Worksheet Set OpenSheet = Nothing On Error Resume Next Set OpenSheet = Sheets(ActiveSheet.Range("E5").Value) If OpenSheet Is Nothing Then Exit Sub Else With OpenSheet ..Visible = xlSheetVisible ..Select Range("I4").Select End With End If End Sub "Chris Lavender" wrote: Hi Ant Assuming F7 displays the name of the sheet selected - ie, is either the linked cell for your (ActiveX) dropdown list or an offset formula referring to the linked cell for an MSForms dropdown control... Sub opensheet() Dim mysheet mysheet = Sheets(1).Range("F7").Value Sheets(mysheet).Visible = True Sheets(mysheet).Select End Sub and then you'd probably want a command button on each of the hidden sheets to return to Sheet1 and hide the sheet you were in... Sub closesheet() Set mysheet = ActiveSheet Sheets(1).Select mysheet.Visible = False Set mysheet = Nothing End Sub Best rgds Chris Lav "Ant" wrote in message ... I have a file with many hidden sheets eg Sheet1, Sheet2...Sheet50. What I want is some code which looks at the selection from a drop down list (on a visible sheet) and the open that sheet. ie if I select Sheet5 from the drop down list, Sheet5 becomes visible. I then want to hide it again once I have finished with it (I can do that bit!). The reason I am doing this is because otherwise I will have too many sheets to tab through. Any thoughts? |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Making pick list conditional on selection from previous pick list | Excel Discussion (Misc queries) | |||
Drop list affected by previous choice | Excel Worksheet Functions | |||
Adding value to drop down list | Excel Discussion (Misc queries) | |||
Problems with external references when creating a drop down list | Excel Discussion (Misc queries) | |||
hidden rows & columns slow file open | Excel Discussion (Misc queries) |