DigitalDingers
New Member
- Joined
- Sep 25, 2018
- Messages
- 5
Hello all -
I am using the below code (not as a module) but at the sheet level. I have it running just fine on 4 of the 5 sheets I need it on. However, for some reason it does not want to run on one particular sheet. Do I have a setting off somewhere? To make things more odd, when I click on the A3 cell and place my cursor next to the formula in the formula space at top and press ENTER, the code runs, but not before then. Like my other sheets (which run this code perfectly), I want it to run automatically once cell A3 = 2.
Can you help?
thx
Private Sub Worksheet_Change(ByVal Target As Range)
If [A3] = 2 Then
Sheets("debt").Visible = True
Sheets("debt").OptionButtons = False
Sheets("debt").Range("B10") = ""
Sheets("debt").Range("E10") = ""
Sheets("debt").Range("H10") = ""
Sheets("debt").Range("K10") = ""
Sheets("debt").Range("N10") = ""
Sheets("debt").Range("B20") = ""
Sheets("debt").Range("I20") = ""
Else
Sheets("debt").Visible = False
End If
End Sub
I am using the below code (not as a module) but at the sheet level. I have it running just fine on 4 of the 5 sheets I need it on. However, for some reason it does not want to run on one particular sheet. Do I have a setting off somewhere? To make things more odd, when I click on the A3 cell and place my cursor next to the formula in the formula space at top and press ENTER, the code runs, but not before then. Like my other sheets (which run this code perfectly), I want it to run automatically once cell A3 = 2.
Can you help?
thx
Private Sub Worksheet_Change(ByVal Target As Range)
If [A3] = 2 Then
Sheets("debt").Visible = True
Sheets("debt").OptionButtons = False
Sheets("debt").Range("B10") = ""
Sheets("debt").Range("E10") = ""
Sheets("debt").Range("H10") = ""
Sheets("debt").Range("K10") = ""
Sheets("debt").Range("N10") = ""
Sheets("debt").Range("B20") = ""
Sheets("debt").Range("I20") = ""
Else
Sheets("debt").Visible = False
End If
End Sub