LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #12   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 10,124
Default Hiding Tabs


Send to my address, not the group

--
Don Guillett
Microsoft MVP Excel
SalesAid Software

"newguy" wrote in message
...
That works except one aspect if I answer more than one of the
questions yes it still only displays one additional tab. So I have 10
questions that the users are asked, if they answer yes to all of them
I need all 10 corresponding tabs. If the answer yes to only 5 I need
those 5 corresponding tabs. Right now if I answer yes to the first
question it gives me that tab, then if I answer the next question it
replaces that tab with the one I need for the last question that I
just answered yes to. Sorry if that is confusing if it would be easier
I can send you what little I have of my workbook in progress.

Thanks Again




On Sep 16, 11:45 am, "Don Guillett" wrote:
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


 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Hiding tabs for just some sheets. Romileyrunner1 Excel Worksheet Functions 4 September 9th 09 03:03 PM
Hiding Tabs jordanpcpre Excel Discussion (Misc queries) 7 July 7th 08 09:08 PM
Hiding Tabs jdawg Excel Programming 1 June 24th 05 03:53 PM
Hiding Tabs Nash Excel Programming 2 June 21st 05 06:20 PM
Hiding Tabs Greg B[_4_] Excel Programming 3 March 8th 05 02:08 PM


All times are GMT +1. The time now is 11:44 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"