Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I am trying to find a way to hide or show tabs based answers from a
user on a menu page. So if the user answers "yes" to the first question then tab 1 shows up if "no" tab 1 does not show up. Haven't had a lot of experience with VBA thank you for your help. |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
what do you mean by tabs? do you mean the worksheet tabs at the bottom?
"newguy" wrote: I am trying to find a way to hide or show tabs based answers from a user on a menu page. So if the user answers "yes" to the first question then tab 1 shows up if "no" tab 1 does not show up. Haven't had a lot of experience with VBA thank you for your help. |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
On Sep 16, 9:22*am, Wullie wrote:
what do you mean by tabs? do you mean the worksheet tabs at the bottom? "newguy" wrote: I am trying to find a way to hide or show tabs based answers from a user on a menu page. So if the user answers "yes" to the first question then tab 1 shows up if "no" tab 1 does not show up. Haven't had a lot of experience with VBA thank you for your help. Yes |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
You can't hide the tabs individually... either they all are visible or they
all are not visible. To hide all the tabs, execute this statement... ActiveWindow.DisplayWorkbookTabs = False to redisplay them again, execute this statement... ActiveWindow.DisplayWorkbookTabs = True -- Rick (MVP - Excel) "newguy" wrote in message ... On Sep 16, 9:22 am, Wullie wrote: what do you mean by tabs? do you mean the worksheet tabs at the bottom? "newguy" wrote: I am trying to find a way to hide or show tabs based answers from a user on a menu page. So if the user answers "yes" to the first question then tab 1 shows up if "no" tab 1 does not show up. Haven't had a lot of experience with VBA thank you for your help. Yes |
#5
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() If I can't hide tabs individually can I add tabs individually based on a template? My original plan was to have a 10 or so tabs and 10 questions based on their answers (Yes/No) they would either show up or be hidden. Can I instead have the worksheets saved as templates and based on their answers to the questions add those templates as tabs? |
#6
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Based on the wording of your latest post, I think I need a clarification
please. Perhaps you and I are using the word "tabs" differently... the tabs I was talking about in my response is the small extension located at the bottom of a worksheet that contains the name of the worksheet... your last response makes me think you might be talking about the entire worksheet. Exactly what do you want to be hidden... the worksheet's identifying tab at the bottom of the worksheet or the entire worksheet itself? -- Rick (MVP - Excel) "newguy" wrote in message ... If I can't hide tabs individually can I add tabs individually based on a template? My original plan was to have a 10 or so tabs and 10 questions based on their answers (Yes/No) they would either show up or be hidden. Can I instead have the worksheets saved as templates and based on their answers to the questions add those templates as tabs? |
#7
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() This is the correct place since you need a macro. Right click sheet tabview codeinsert this. Change $A$8 and sheet name to suit Private Sub Worksheet_Change(ByVal Target As Range) If Target.Address < "$A$8" Then Exit Sub If UCase(Target) = "YES" Then Sheets("sheet2").Visible = True End Sub -- Don Guillett Microsoft MVP Excel SalesAid Software "newguy" wrote in message ... I am trying to find a way to hide or show tabs based answers from a user on a menu page. So if the user answers "yes" to the first question then tab 1 shows up if "no" tab 1 does not show up. Haven't had a lot of experience with VBA thank you for your help. |
#8
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
On Sep 16, 9:26*am, "Don Guillett" wrote:
This is the correct place since you need a macro. Right click sheet tabview codeinsert this. Change $A$8 and sheet name to suit Private Sub Worksheet_Change(ByVal Target As Range) If Target.Address < "$A$8" Then Exit Sub If UCase(Target) = "YES" Then Sheets("sheet2").Visible = True End Sub -- Don Guillett Microsoft MVP Excel SalesAid Software "newguy" wrote in message ... I am trying to find a way to hide or show tabs based answers from a user on a menu page. So if the user answers "yes" to the first question then tab 1 shows up if "no" tab 1 does not show up. Haven't had a lot of experience with VBA thank you for your help. 2 Questions will the changes on what tabs show change as the user inputs the answers to the questions? And to duplicate this for other tabs I just need to copy the "If statements" and change the Cell reference and tab name to suit? Thank you |
#10
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
So this will look at a range of cells and show the worksheets based on
what values is in that range of cells? This seems a lot more complex than your original solution and I really don't understand what it is doing. On Sep 16, 10:33*am, "Don Guillett" wrote: You can restrict the range to just those cells desired. You could use a select case for each of the tabs desired. Private Sub Worksheet_Change(ByVal Target As Range) If Intersect(Target, Range("a2:a8")) Is Nothing Then Exit Sub On Error Resume Next 'hide all but menu For Each sh In Sheets * If sh.Name < "Menu" Then sh.Visible = False Next sh '------ Select Case Target.Row *Case 2: x = "sheet2" *Case 3: x = "sheet3" 'etc *Case Else End Select If UCase(Target) = "YES" Then Sheets(x).Visible = True End Sub -- Don Guillett Microsoft MVP Excel SalesAid Software "newguy" wrote in message ... On Sep 16, 9:26 am, "Don Guillett" wrote: This is the correct place since you need a macro. Right click sheet tabview codeinsert this. Change $A$8 and sheet name to suit Private Sub Worksheet_Change(ByVal Target As Range) If Target.Address < "$A$8" Then Exit Sub If UCase(Target) = "YES" Then Sheets("sheet2").Visible = True End Sub -- Don Guillett Microsoft MVP Excel SalesAid Software "newguy" wrote in message .... I am trying to find a way to hide or show tabs based answers from a user on a menu page. So if the user answers "yes" to the first question then tab 1 shows up if "no" tab 1 does not show up. Haven't had a lot of experience with VBA thank you for your help. 2 Questions will the changes on what tabs show change as the user inputs the answers to the questions? And to duplicate this for other tabs I just need to copy the "If statements" and change the Cell reference and tab name to suit? Thank you |
#11
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
No, this will look in the range for yes in a cell. As written, it hides all
but the menu sheet and if yes in a cell it will UNhide the sheet for that cell. If all else fails, send your workbook to my address below along with EXACTLY what you want and I'll take a look. -- Don Guillett Microsoft MVP Excel SalesAid Software "newguy" wrote in message ... So this will look at a range of cells and show the worksheets based on what values is in that range of cells? This seems a lot more complex than your original solution and I really don't understand what it is doing. On Sep 16, 10:33 am, "Don Guillett" wrote: You can restrict the range to just those cells desired. You could use a select case for each of the tabs desired. Private Sub Worksheet_Change(ByVal Target As Range) If Intersect(Target, Range("a2:a8")) Is Nothing Then Exit Sub On Error Resume Next 'hide all but menu For Each sh In Sheets If sh.Name < "Menu" Then sh.Visible = False Next sh '------ Select Case Target.Row Case 2: x = "sheet2" Case 3: x = "sheet3" 'etc Case Else End Select If UCase(Target) = "YES" Then Sheets(x).Visible = True End Sub -- Don Guillett Microsoft MVP Excel SalesAid Software "newguy" wrote in message ... On Sep 16, 9:26 am, "Don Guillett" wrote: This is the correct place since you need a macro. Right click sheet tabview codeinsert this. Change $A$8 and sheet name to suit Private Sub Worksheet_Change(ByVal Target As Range) If Target.Address < "$A$8" Then Exit Sub If UCase(Target) = "YES" Then Sheets("sheet2").Visible = True End Sub -- Don Guillett Microsoft MVP Excel SalesAid Software "newguy" wrote in message ... I am trying to find a way to hide or show tabs based answers from a user on a menu page. So if the user answers "yes" to the first question then tab 1 shows up if "no" tab 1 does not show up. Haven't had a lot of experience with VBA thank you for your help. 2 Questions will the changes on what tabs show change as the user inputs the answers to the questions? And to duplicate this for other tabs I just need to copy the "If statements" and change the Cell reference and tab name to suit? Thank you |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Hiding tabs for just some sheets. | Excel Worksheet Functions | |||
Hiding Tabs | Excel Discussion (Misc queries) | |||
Hiding Tabs | Excel Programming | |||
Hiding Tabs | Excel Programming | |||
Hiding Tabs | Excel Programming |