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: 42
Default Unhide roes in a different worksheet - My code is not working

Hi,

Basing on values 1to 5 given in a dropdown, I want different rows to
unhide and hide accordingly. I have this code it does not work at
all!!!!

Private Sub Page()
Dim conf
conf = Sheet1.Range("Confirmation").Value

If conf = 1 Then
Sheet6.Rows("4:6").EntireRow.Hidden = False
End If

If conf = 2 Then
Sheet6.Rows("4:6").EntireRow.Hidden = False
Sheet6.Rows("48:50").EntireRow.Hidden = False
End If
If conf = 3 Then
Sheet6.Rows("4:6").EntireRow.Hidden = False
Sheet6.Rows("48:50").EntireRow.Hidden = False
Sheet6.Rows("91:93").EntireRow.Hidden = False
End If
If conf = 4 Then
Sheet6.Rows("4:6").EntireRow.Hidden = False
Sheet6.Rows("48:50").EntireRow.Hidden = False
Sheet6.Rows("91:93").EntireRow.Hidden = False
Sheet6.Rows("134:136").EntireRow.Hidden = False
End If
If conf = 5 Then
Sheet6.Rows("4:6").EntireRow.Hidden = False
Sheet6.Rows("48:50").EntireRow.Hidden = False
Sheet6.Rows("91:93").EntireRow.Hidden = False
Sheet6.Rows("134:136").EntireRow.Hidden = False
Sheet6.Rows("178:180").EntireRow.Hidden = False
End If

If conf = "Select one" Then
Sheet6.Rows("4:6").EntireRow.Hidden = True
Sheet6.Rows("48:50").EntireRow.Hidden = True
Sheet6.Rows("91:93").EntireRow.Hidden = True
Sheet6.Rows("134:136").EntireRow.Hidden = True
Sheet6.Rows("178:180").EntireRow.Hidden = True
End If

End Sub

Some one please help me make modifications to this code or give me
another work around code.
Thanks a lot
Regards,
SRC

 
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
coloured roes static while sorting data ybeckett Excel Discussion (Misc queries) 3 December 4th 09 04:45 PM
My code is still not working -- Excel 2000 Worksheet protection Bill Case Excel Programming 2 September 19th 06 03:56 PM
how do i unhide a worksheet in excel 2003? unhide tab don't work mikekeat Excel Discussion (Misc queries) 2 March 6th 06 03:36 AM
Code not working after worksheet change. Erik Excel Programming 0 September 17th 04 04:01 AM


All times are GMT +1. The time now is 10:04 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"