Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Show / Hide Sheets based on combo box in Excel

Status
Not open for further replies.

kodr

Programmer
Dec 4, 2003
368
Basically what I'm trying to do is to show or hide worksheets in excel based on data being selected in a combobox that is directly on the 'main' worksheet that will never be hidden.

I've done this in code, but I'm looking for a solution that would allow me to do this without distributing any code. Is it possible to do this through formulas?

For instance, I have 3 sheets (1 thru 3) and sheet1 has a combobox with 2 values, sheet2 and sheet3. Sheets 2 and 3 are hidden by default, and when sheet2 is selected in the combobox, sheet2 is unhidden.

Thanks.
 
-> Is it possible to do this through formulas?

Nope. Sorry.

[tt]_____
[blue]-John[/blue][/tt]
[tab][red]The plural of anecdote is not data[/red]

Help us help you. Please read FAQ 181-2886 before posting.
 
basically no!
you can't manipulate the workbook structure through formulas - only through code (or manually, obviously!)

unless 2003 has something i've not seen yet or this functionality was introduced with 2007

;-)
If a man says something and there are no women there to hear him, is he still wrong? [ponder]
How do I get the best answers?
 
Thanks, I was afraid of that.

I think what I'll resort to then, is to create a blank workbook with a combobox and control button, and pre-load the code. Then when the data is created, load the combobox with the list of sheets.

I'll only have to distribute the code for handling the controls and hiding/unhiding the worksheets.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top