Hi!
I have seen similar posts for this however when I tried to employ the suggestions/code it wouldn't work for me.
I have an excel book that has a form that users need to fill out and then "sign" to say they have done what they were suppsed to do.
What I want to have happen is that when they select 3 different cells on this tab, different rows hide or unhide etc. Right now the only way I can get it to run is to do it through <<Private Sub Worksheet_Change(ByVal Target As Range)>>.
But this means that when other actions happen on this tab (i.e. other buttons/macros run, other cells have data entered into them) the this private sub macro is continually firing.
How can I make it fire ONLY when either or both of these 3 "target" cells are changed? These cells are E6 (named as "TypeofWork"), E7 (named "AddClientLine") and S43 (named "TotalTriggers").
Any help would be much appreciated!
Private Sub Worksheet_Change(ByVal Target As Range)
' Oct 11, 2012
' hide rows if ASO or Financial review required
' unhide rows to correspond to the # of clients being shown
Dim sChoose As String
With Application
CalcMode = .Calculation
.Calculation = xlCalculationAutomatic
.ScreenUpdating = False
End With
''''''''''''''''''''
'unprotects sheet
Sheets("FinancialPeerReviewUWForm").Unprotect
''''''''''''''''''''
''''''''''''''
'starts off form with #PR item row hidden, will unhide if needed
''''''''''''''
Range("PRTriggered").Select
Selection.EntireRow.Hidden = True
'''''''''''''''
sChoose = Range("E6").Value
Select Case sChoose
Case Is = "Choose One" 'show all rows
Range("24:46").Select
Selection.EntireRow.Hidden = True
Range("79:84").Select 'hides ASO section if chose one
Selection.EntireRow.Hidden = True
Range("E6").Select 'sets resting spot
Case Is = "Financial" 'show just rows for Financials
Range("30:30").Select
Selection.EntireRow.Hidden = True
Range("24:29,31:46").Select
Selection.EntireRow.Hidden = False
Range("79:84").Select 'hides ASO section if Financial chosen
Selection.EntireRow.Hidden = True
Range("E6").Select 'sets resting spot
Case Is = "ASO Rec" 'show just rows for ASO recs
Range("30:30,31:31,33:33,36:36").Select
Selection.EntireRow.Hidden = False
Range("25:29,31:31,34:35,37:42").Select
Selection.EntireRow.Hidden = True
Range("E6").Select 'sets resting spot
End Select
'''''''''''''''''''
Call AddClient ' macro to unhide rows if needed for extra client lines
'''''''''''''''''''
''''''''''''''''''
'hide # PR triggered row if nothing triggered
If Range("TotalTriggers") >= 1 Then
Range("PRTriggered").Select
Selection.EntireRow.Hidden = False
End If
Range("C24").Select 'sets resting spot
''''''''''''''''''
Application.ScreenUpdating = True
End Sub
Bookmarks