Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.misc
|
|||
|
|||
Command Button to show/hide a different worksheet
Hello I have several command buttons in a worksheet. each command button
selects a different worksheet. Each worksheet has a different form . Example Private Sub CommandButton5_Click() Worksheets("Application").Activate End Sub What I want to do is if the command button "application" is selected to open the worksheet "application" and the other worksheets to be hidden. thanks in advance |
#2
Posted to microsoft.public.excel.misc
|
|||
|
|||
Command Button to show/hide a different worksheet
Hello
I assume your "MainSheet" should always be visible. Try this: Private Sub CommandButton5_Click() For Each sh In ThisWorkbook.Sheets If sh.Name < "MainSheet" Then sh.Visible = False End If Next With Worksheets("Application") .Visible = True .Activate End With End Sub Regards, Per On 22 Apr., 03:42, Marilyn wrote: Hello * I have several command buttons in a worksheet. each command button selects a different worksheet. *Each worksheet has a different form . Example Private Sub CommandButton5_Click() Worksheets("Application").Activate End Sub What I want to do *is if the command button "application" is selected to open the worksheet "application" and the other worksheets to be hidden. * thanks in advance |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
using a toggle button to show or hide information in several cells | Excel Worksheet Functions | |||
hide or show a series with a button | Charts and Charting in Excel | |||
SUBTOTAL'S SHOW AND HIDE DETAILS BUTTON MISSING | Excel Discussion (Misc queries) | |||
Use of Forms Command-button on Worksheet | Excel Discussion (Misc queries) | |||
Command Button to Hide/Unhide Rows | Excel Discussion (Misc queries) |