LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 37
Default Sheet code

I am struggling with some change event sheet code. I have
a data validation list in a cell and when I pick "Y" from
this list I want 2 hidden worksheets to become visible.
For some reason one of the sheets appears but not the
other, this is what I am using:

Private Sub Worksheet_Change(ByVal Target As Excel.Range)
If Range("C20").Value = "Y" Then
Sheets("sheet1").Visible = True
Sheets("sheet2").Visible = True
Else
Sheets("sheet1").Visible = False
Sheets("sheet2").Visible = False
End If
End Sub

Any help gratefully received.

Gareth
 
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
VB code to copy sheet format to another sheet ASU Excel Discussion (Misc queries) 12 August 10th 06 02:37 AM
Sheet Code Module: copying code to [email protected][_2_] Excel Programming 2 December 14th 04 01:57 AM
excel - macro code to open a protected sheet, enter passowrd, and then protect sheet arunjoshi[_5_] Excel Programming 1 May 2nd 04 03:50 PM
unprotect sheet in code and make sheet visible peach255 Excel Programming 1 August 1st 03 03:28 AM
Help with some sheet code Gareth[_3_] Excel Programming 1 July 12th 03 04:10 PM


All times are GMT +1. The time now is 08:31 AM.

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"