Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Ant
 
Posts: n/a
Default

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
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
Making pick list conditional on selection from previous pick list Stewart Excel Discussion (Misc queries) 1 June 27th 05 11:30 AM
Drop list affected by previous choice Gaëtan Mongeon Excel Worksheet Functions 2 June 26th 05 01:29 AM
Adding value to drop down list neb Excel Discussion (Misc queries) 3 June 24th 05 01:40 PM
Problems with external references when creating a drop down list andreah Excel Discussion (Misc queries) 1 May 19th 05 10:07 PM
hidden rows & columns slow file open Simon Shaw Excel Discussion (Misc queries) 0 April 5th 05 12:21 AM


All times are GMT +1. The time now is 03:32 PM.

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"