Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 19
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 694
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 19
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 19
Default 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
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
differentiate between a visible and a hidden userform RB Smissaert Excel Programming 2 June 30th 05 10:11 PM
Worksheet has to set to visible as it is not visible after saving and closing Excel by VB. Oscar Excel Programming 6 June 21st 05 10:39 PM
Making sheets visible / hidden Xlyr Excel Programming 1 March 6th 05 07:45 PM
Visible Sheet Showing When Hidden Rockee052[_63_] Excel Programming 0 March 7th 04 07:43 AM
Check status row (hidden or visible)? Martin Los Excel Programming 1 December 18th 03 03:32 PM


All times are GMT +1. The time now is 03:25 AM.

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

About Us

"It's about Microsoft Excel"