Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
If a certain cell has a certain value, a certain worksheet is hidden or visible
Hello Everyone:
I have a cell named "Input_StepRatePerformed". It has a drop down list (I am using Data/Validation from the Toolbar) with Yes and No as the only two choices. What I want to do is if Yes is in the cell, the worksheet named "SRT" is visible. If No is selected then "SRT" worksheet is hidden. I have tried some different code such as worksheet change with no success. I am not sure where to begin. Any help is greatly appreciated. Thanks in advance. Matt |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
If a certain cell has a certain value, a certain worksheet is hidd
Hi Matt:
Try a worksheet cahnge event testing for the cell and then testing the value: Private Sub Worksheet_Change(ByVal Target As Range) If Not (Intersect(Target, Range("E1")) Is Nothing) Then Sheets("SRT").Visible = (Me.Range("E1").Value = "Yes") End If End Sub -- Hope this helps Martin Fishlock, Bangkok, Thailand Please do not forget to rate this reply. "Matt" wrote: Hello Everyone: I have a cell named "Input_StepRatePerformed". It has a drop down list (I am using Data/Validation from the Toolbar) with Yes and No as the only two choices. What I want to do is if Yes is in the cell, the worksheet named "SRT" is visible. If No is selected then "SRT" worksheet is hidden. I have tried some different code such as worksheet change with no success. I am not sure where to begin. Any help is greatly appreciated. Thanks in advance. Matt |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
If a certain cell has a certain value, a certain worksheet is hidd
On Feb 9, 12:40 am, Martin Fishlock
wrote: Hi Matt: Try a worksheet cahnge event testing for the cell and then testing the value: Private Sub Worksheet_Change(ByVal Target As Range) If Not (Intersect(Target, Range("E1")) Is Nothing) Then Sheets("SRT").Visible = (Me.Range("E1").Value = "Yes") End If End Sub -- Hope this helps Martin Fishlock, Bangkok, Thailand Please do not forget to rate this reply. "Matt" wrote: Hello Everyone: I have a cell named "Input_StepRatePerformed". It has a drop down list (I am using Data/Validation from the Toolbar) with Yes and No as the only two choices. What I want to do is if Yes is in the cell, the worksheet named "SRT" is visible. If No is selected then "SRT" worksheet is hidden. I have tried some different code such as worksheet change with no success. I am not sure where to begin. Any help is greatly appreciated. Thanks in advance. Matt- Hide quoted text - - Show quoted text - How do I make it invisible if No is selected? I am a newbie trying to learn. Thanks. |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
If a certain cell has a certain value, a certain worksheet is hidd
I put it in and it works. Martin, I appreciate the help. I have been
pulling my hair out. Thanks again. I'll rate your post as excellent. Matt |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
differentiate between a visible and a hidden userform | Excel Programming | |||
Worksheet has to set to visible as it is not visible after saving and closing Excel by VB. | Excel Programming | |||
Making sheets visible / hidden | Excel Programming | |||
Visible Sheet Showing When Hidden | Excel Programming | |||
Check status row (hidden or visible)? | Excel Programming |