I have a series of macros which run when the user toggles between either Y or N in a dropdown on the sheet.
for some reason these macro have become unresponsive
I have completely closed excel down and re-opened it to no avail
Do I need to add a command in the "Immediate Box"
Thanks
Private Sub Worksheet_Change(ByVal Target As Range)
Dim cell As Range
If Intersect(Target, Range("J3:J32")) Is Nothing Then Exit Sub
Application.ScreenUpdating = False
For Each cell In Selection
Select Case cell.Address(False, False) & cell.Value
Case "J3" & "Y": Call Show_GRAPH01
Case "J3" & "N": Call Hide_GRAPH01
Case "J4" & "Y": Call Show_GRAPH02
Case "J4" & "N": Call Hide_GRAPH02
Case "J5" & "Y": Call Show_GRAPH03
Case "J5" & "N": Call Hide_GRAPH03
Case "J6" & "Y": Call Show_GRAPH04
Case "J6" & "N": Call Hide_GRAPH04
Case "J7" & "Y": Call Show_GRAPH05
Case "J7" & "N": Call Hide_GRAPH05
Case "J8" & "Y": Call Show_GRAPH06
Case "J8" & "N": Call Hide_GRAPH06
Case "J9" & "Y": Call Show_GRAPH07
Case "J9" & "N": Call Hide_GRAPH07
Case "J10" & "Y": Call Show_GRAPH08
Case "J10" & "N": Call Hide_GRAPH08
Case "J11" & "Y": Call Show_GRAPH09
Case "J11" & "N": Call Hide_GRAPH09
Case "J12" & "Y": Call Show_GRAPH10
Case "J12" & "N": Call Hide_GRAPH10
Case "J13" & "Y": Call Show_GRAPH11
Case "J13" & "N": Call Hide_GRAPH11
Case "J14" & "Y": Call Show_GRAPH12
Case "J14" & "N": Call Hide_GRAPH12
Case "J15" & "Y": Call Show_GRAPH13
Case "J15" & "N": Call Hide_GRAPH13
Case "J16" & "Y": Call Show_GRAPH14
Case "J16" & "N": Call Hide_GRAPH14
Case "J17" & "Y": Call Show_GRAPH15
Case "J17" & "N": Call Hide_GRAPH15
Case "J18" & "Y": Call Show_GRAPH16
Case "J18" & "N": Call Hide_GRAPH16
Case "J19" & "Y": Call Show_GRAPH17
Case "J19" & "N": Call Hide_GRAPH17
Case "J20" & "Y": Call Show_GRAPH18
Case "J20" & "N": Call Hide_GRAPH18
Case "J21" & "Y": Call Show_GRAPH19
Case "J21" & "N": Call Hide_GRAPH19
Case "J22" & "Y": Call Show_GRAPH20
Case "J22" & "N": Call Hide_GRAPH20
Case "J23" & "Y": Call Show_GRAPH21
Case "J23" & "N": Call Hide_GRAPH21
Case "J24" & "Y": Call Show_GRAPH22
Case "J24" & "N": Call Hide_GRAPH22
Case "J25" & "Y": Call Show_GRAPH23
Case "J25" & "N": Call Hide_GRAPH23
Case "J26" & "Y": Call Show_GRAPH24
Case "J26" & "N": Call Hide_GRAPH24
Case "J27" & "Y": Call Show_GRAPH25
Case "J27" & "N": Call Hide_GRAPH25
Case "J28" & "Y": Call Show_GRAPH26
Case "J28" & "N": Call Hide_GRAPH26
Case "J29" & "Y": Call Show_GRAPH27
Case "J29" & "N": Call Hide_GRAPH27
Case "J30" & "Y": Call Show_GRAPH28
Case "J30" & "N": Call Hide_GRAPH28
Case "J31" & "Y": Call Show_GRAPH29
Case "J31" & "N": Call Hide_GRAPH29
Case "J32" & "Y": Call Show_GRAPH30
Case "J32" & "N": Call Hide_GRAPH30
End Select
Next cell
Application.ScreenUpdating = True
End Sub
for some reason these macro have become unresponsive
I have completely closed excel down and re-opened it to no avail
Do I need to add a command in the "Immediate Box"
Thanks
Private Sub Worksheet_Change(ByVal Target As Range)
Dim cell As Range
If Intersect(Target, Range("J3:J32")) Is Nothing Then Exit Sub
Application.ScreenUpdating = False
For Each cell In Selection
Select Case cell.Address(False, False) & cell.Value
Case "J3" & "Y": Call Show_GRAPH01
Case "J3" & "N": Call Hide_GRAPH01
Case "J4" & "Y": Call Show_GRAPH02
Case "J4" & "N": Call Hide_GRAPH02
Case "J5" & "Y": Call Show_GRAPH03
Case "J5" & "N": Call Hide_GRAPH03
Case "J6" & "Y": Call Show_GRAPH04
Case "J6" & "N": Call Hide_GRAPH04
Case "J7" & "Y": Call Show_GRAPH05
Case "J7" & "N": Call Hide_GRAPH05
Case "J8" & "Y": Call Show_GRAPH06
Case "J8" & "N": Call Hide_GRAPH06
Case "J9" & "Y": Call Show_GRAPH07
Case "J9" & "N": Call Hide_GRAPH07
Case "J10" & "Y": Call Show_GRAPH08
Case "J10" & "N": Call Hide_GRAPH08
Case "J11" & "Y": Call Show_GRAPH09
Case "J11" & "N": Call Hide_GRAPH09
Case "J12" & "Y": Call Show_GRAPH10
Case "J12" & "N": Call Hide_GRAPH10
Case "J13" & "Y": Call Show_GRAPH11
Case "J13" & "N": Call Hide_GRAPH11
Case "J14" & "Y": Call Show_GRAPH12
Case "J14" & "N": Call Hide_GRAPH12
Case "J15" & "Y": Call Show_GRAPH13
Case "J15" & "N": Call Hide_GRAPH13
Case "J16" & "Y": Call Show_GRAPH14
Case "J16" & "N": Call Hide_GRAPH14
Case "J17" & "Y": Call Show_GRAPH15
Case "J17" & "N": Call Hide_GRAPH15
Case "J18" & "Y": Call Show_GRAPH16
Case "J18" & "N": Call Hide_GRAPH16
Case "J19" & "Y": Call Show_GRAPH17
Case "J19" & "N": Call Hide_GRAPH17
Case "J20" & "Y": Call Show_GRAPH18
Case "J20" & "N": Call Hide_GRAPH18
Case "J21" & "Y": Call Show_GRAPH19
Case "J21" & "N": Call Hide_GRAPH19
Case "J22" & "Y": Call Show_GRAPH20
Case "J22" & "N": Call Hide_GRAPH20
Case "J23" & "Y": Call Show_GRAPH21
Case "J23" & "N": Call Hide_GRAPH21
Case "J24" & "Y": Call Show_GRAPH22
Case "J24" & "N": Call Hide_GRAPH22
Case "J25" & "Y": Call Show_GRAPH23
Case "J25" & "N": Call Hide_GRAPH23
Case "J26" & "Y": Call Show_GRAPH24
Case "J26" & "N": Call Hide_GRAPH24
Case "J27" & "Y": Call Show_GRAPH25
Case "J27" & "N": Call Hide_GRAPH25
Case "J28" & "Y": Call Show_GRAPH26
Case "J28" & "N": Call Hide_GRAPH26
Case "J29" & "Y": Call Show_GRAPH27
Case "J29" & "N": Call Hide_GRAPH27
Case "J30" & "Y": Call Show_GRAPH28
Case "J30" & "N": Call Hide_GRAPH28
Case "J31" & "Y": Call Show_GRAPH29
Case "J31" & "N": Call Hide_GRAPH29
Case "J32" & "Y": Call Show_GRAPH30
Case "J32" & "N": Call Hide_GRAPH30
End Select
Next cell
Application.ScreenUpdating = True
End Sub