Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
hi everyone,
i have a work book with 4 worksheets i have a userform that is initialised when the workbook is opened. on the form is 4 buttons one for each sheet. button one would show the worksheet tabs for sheets 1 and 2, button two would show the worksheet tabs for sheets 1 and 3, button three would show the worksheet tabs for sheet 1, button four would show the worksheet tabs for sheets 1 and 4, i'm taking it that by hiding the worksheet tabs that the worksheet itself is hidden! help in this dilema is very much appreciated. thank you Dave ferris |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() Dave ferris;160515 Wrote: i have a work book with 4 worksheets i have a userform that is initialised when the workbook is opened. on the form is 4 buttons one for each sheet. button one would show the worksheet tabs for sheets 1 and 2, button two would show the worksheet tabs for sheets 1 and 3, button three would show the worksheet tabs for sheet 1, button four would show the worksheet tabs for sheets 1 and 4, i'm taking it that by hiding the worksheet tabs that the worksheet itself is hidden! Your only question is "does hiding the tab make the sheet hidden, too?" If so, yes, the sheet is hidden. Unless the sheets are password protected in some way, though, they can be rather easily unhidden, too, by the user. Did you have some other question? -- JBeaucaire ------------------------------------------------------------------------ JBeaucaire's Profile: http://www.thecodecage.com/forumz/member.php?userid=73 View this thread: http://www.thecodecage.com/forumz/sh...ad.php?t=44613 |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
In the UserForm code window put this code for the Option Buttons:
Private Sub OptionButton1_Click() Sheet1.Visible = True Sheet2.Visible = True Sheet3.Visible = False Sheet4.Visible = False End Sub Private Sub OptionButton2_Click() Sheet1.Visible = True Sheet2.Visible = False Sheet3.Visible = True Sheet4.Visible = False End Sub Private Sub OptionButton3_Click() Sheet1.Visible = True Sheet2.Visible = False Sheet3.Visible = False Sheet4.Visible = False End Sub Private Sub OptionButton4_Click() Sheet1.Visible = True Sheet2.Visible = False Sheet3.Visible = False Sheet4.Visible = True End Sub Mike F "Dave ferris" wrote in message ... hi everyone, i have a work book with 4 worksheets i have a userform that is initialised when the workbook is opened. on the form is 4 buttons one for each sheet. button one would show the worksheet tabs for sheets 1 and 2, button two would show the worksheet tabs for sheets 1 and 3, button three would show the worksheet tabs for sheet 1, button four would show the worksheet tabs for sheets 1 and 4, i'm taking it that by hiding the worksheet tabs that the worksheet itself is hidden! help in this dilema is very much appreciated. thank you Dave ferris |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() The code above would work, but without some extra work on your part, users would be able to easily make the other sheets visible again. Use the VeryHidden attribute to make the sheets unviewable without more VBA code. -- JBeaucaire ------------------------------------------------------------------------ JBeaucaire's Profile: http://www.thecodecage.com/forumz/member.php?userid=73 View this thread: http://www.thecodecage.com/forumz/sh...ad.php?t=44613 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Hide or display worksheets based on form | Excel Discussion (Misc queries) | |||
Issue with workbook not being selected when form button is clicked | Excel Programming | |||
how to hide a form button in a worksheet | Excel Discussion (Misc queries) | |||
Hide a form button | Excel Programming | |||
Pause macro, add form button to sheet, continue macro when button clicked! | Excel Programming |