Bnagel
03-13-2020, 05:41 AM
First time posting here. I am having an issue running this block of code:
Private Sub Macro11(ByVal Target As Range)
'requested pcb
If Range("data_7670_100_v1.1_jp6_select").Value = "Open" And Range("data_7670_100_v1.1_jp7_select").Value = "Open" Then
Application.EnableEvents = False
Range("data_7670_100_v1.1_ai_b2_select").Value = "0-5v"
Application.EnableEvents = True
Else
Application.EnableEvents = False
Range("data_7670_100_v1.1_ai_b2_select").Value = "Select"
Application.EnableEvents = True
End If
This code runs in several other Private Subs and all I am changing is the named ranges that its looking at for their value.
I have verified that each named range is correctly named and there is no miss spelling.
Any help would be greatly appreciated. This has me scratching my head, why does it work in one location but not another...
Private Sub Macro11(ByVal Target As Range)
'requested pcb
If Range("data_7670_100_v1.1_jp6_select").Value = "Open" And Range("data_7670_100_v1.1_jp7_select").Value = "Open" Then
Application.EnableEvents = False
Range("data_7670_100_v1.1_ai_b2_select").Value = "0-5v"
Application.EnableEvents = True
Else
Application.EnableEvents = False
Range("data_7670_100_v1.1_ai_b2_select").Value = "Select"
Application.EnableEvents = True
End If
This code runs in several other Private Subs and all I am changing is the named ranges that its looking at for their value.
I have verified that each named range is correctly named and there is no miss spelling.
Any help would be greatly appreciated. This has me scratching my head, why does it work in one location but not another...