![]() |
visable sheet using combo box selection
Hello, I need to have a workbook that would show a tab/sheet named "Main
Menu". I would also have 5 other tabs/sheets named after employees names and these sheets I need to be visible = false. What I wanted to do was to have a combo box on my "Main Menu" tab/sheet that would have all the names of the tabs/sheets that are curently visable = fale and when I select an tab/sheet from the combo box I would like it to make that tab/sheet visible = true and when I close the sheet it changes it back to visible = false. How can I do this? Thanks! I want to have a main tab that I would select an employees name from a drop down list "The employee name would be the name of a tab" Then it would make the tab visible then I would have a button to close or make it visible = false again and only show the main screen where I need to select an employee. How would I acomplish this? |
visable sheet using combo box selection
Hi Chad,
I would recommend the following: Add a combobox using the Control Toolbox toolbar and select your range of employee names (right click in design mode, select properties, and put range under ListFillRange). Double click the combobox and put the following code in: Private Sub ComboBox1_Change() Sheets(ComboBox1.Value).Visible = True Sheets(ComboBox1.Value).Select End Sub Make buttons in the same way on your employee pages and use the following code (Repeat this part for each employee sheet): Private Sub CommandButton1_Click() ActiveSheet.Visible = False End Sub This will allow you to select the employee whos sheet you want to edit (through the combo box) and then "close" that sheet (using the button on each sheet). Hope this helps! -- -SA "Chad" wrote: Hello, I need to have a workbook that would show a tab/sheet named "Main Menu". I would also have 5 other tabs/sheets named after employees names and these sheets I need to be visible = false. What I wanted to do was to have a combo box on my "Main Menu" tab/sheet that would have all the names of the tabs/sheets that are curently visable = fale and when I select an tab/sheet from the combo box I would like it to make that tab/sheet visible = true and when I close the sheet it changes it back to visible = false. How can I do this? Thanks! I want to have a main tab that I would select an employees name from a drop down list "The employee name would be the name of a tab" Then it would make the tab visible then I would have a button to close or make it visible = false again and only show the main screen where I need to select an employee. How would I acomplish this? |
All times are GMT +1. The time now is 06:53 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com