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: 247
Default Multiple (ByVal Target As Range) Cancel each other out, as written

My initial test of the paramenter worked out great!!

Then I added the other paramaters.
When putting a "1" in cell called TR1_AUG, into parameter 1
parameter 2 obviously cancels it out, so that no ranges are hidden.

I currently have 5 parameters of which only ONE may be selected at any time.
That one selection causes 8 ranges to be hidden. (although more ranges to
hide will likely be required)
It is imperative that the DE-selection of the given cell does UN-hide any
previously hidden ranges.

Can this be done in one go? if so, how?
OR should it be set up as 5 independant subs?
How would that have to be done?

Thank-you

If Range("TR1_AUG") = 1 Then 'Single Cell
Rows.EntireRow.Hidden = False
Range("TR2_PAD_S, TR3_FP16_S, TR4_FP26_S, TR5_FP36_S, Disch2_PAD_S,
Disch3_FD16_S, Disch4_FD26_S, Disch5_FD36_S").EntireRow.Hidden = True
Else
Rows.EntireRow.Hidden = False
End If

If Range("TR2_PAD") = 1 Then
Rows.EntireRow.Hidden = False
Range("TR1_AUG_S, TR3_FP16_S, TR4_FP26_S, TR5_FP36_S, Disch1_AUG_S,
Disch3_FD16_S, Disch4_FD26_S, Disch5_FD36_S").EntireRow.Hidden = True
Else
Rows.EntireRow.Hidden = False
End If

If Range("TR3_FP16") = 1 Then
Rows.EntireRow.Hidden = False
Range("TR1_AUG_S, TR2_PAD_S, TR4_FP26_S, TR5_FP36_S, Disch1_AUG_S,
Disch2_PAD_S, Disch4_FD26_S, Disch5_FD36_S").EntireRow.Hidden = True
Else
Rows.EntireRow.Hidden = False
End If


 
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
Using Worksheet_Change(ByVal Target As Range) Les G Excel Programming 6 November 13th 07 12:40 AM
Why _Change(ByVal Target As Range) Jim at Eagle Excel Programming 4 May 11th 05 07:36 PM
Ranges:Target in Worksheet_SelectionChange(ByVal Target As Range) Kevin McCartney Excel Programming 3 April 15th 05 01:51 PM
ByVal Target As Range monir Excel Programming 4 April 12th 05 04:37 PM
what does (ByVal Target As Range) mean Zygoid[_7_] Excel Programming 6 January 31st 04 05:08 PM


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