paulralph86
New Member
- Joined
- Mar 28, 2017
- Messages
- 18
Hi there!
My apologies if this is lesson 1 VBA however, I am a complete beginner at this.
I have the following code that works, however, I am required to click somewhere in the worksheet for it to complete the run.
The first section works fine, as soon as I click the F8 cell the F9:F20 field resets to empty. It is the second action that requires me to to click anywhere in the worksheet to complete it.
Is there a way to make it run from start to finish automatically?
He is the macro I have....
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If Target.Address = Range("F8").Address Then
Range("F9:F20").Value = ""
End If
If Range("F14").Value = "No Surface Treatment/Coating" Then
Range("F16,F18,F20").Value = "No Surface Treatment/Coating"
End If
End Sub
I appreciate any help/advice you can give me.
Many Thanks,
Paul
My apologies if this is lesson 1 VBA however, I am a complete beginner at this.
I have the following code that works, however, I am required to click somewhere in the worksheet for it to complete the run.
The first section works fine, as soon as I click the F8 cell the F9:F20 field resets to empty. It is the second action that requires me to to click anywhere in the worksheet to complete it.
Is there a way to make it run from start to finish automatically?
He is the macro I have....
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If Target.Address = Range("F8").Address Then
Range("F9:F20").Value = ""
End If
If Range("F14").Value = "No Surface Treatment/Coating" Then
Range("F16,F18,F20").Value = "No Surface Treatment/Coating"
End If
End Sub
I appreciate any help/advice you can give me.
Many Thanks,
Paul