Pat_The_Bat
Board Regular
- Joined
- Jul 12, 2018
- Messages
- 82
I've inserted the code below,
I change the value in cell F9, which should trigger the second sub below
I hit enter and my cursor goes to F10. Macro doesn't give expected result.
I hit enter a few more times and cursor continues down the page. No expected result.
I click those cells moving back up the page. nothing changes
When I click back onto cell F9 where I originally made the change, NOW I get the intended result.
I thought that as soon as made the change to F9 I should get that result. I don't know why I have to make the change in F9, click to another cell, and then click back to F9 to get the result.
Any help is appreciated.
This is the sub it calls
I change the value in cell F9, which should trigger the second sub below
I hit enter and my cursor goes to F10. Macro doesn't give expected result.
I hit enter a few more times and cursor continues down the page. No expected result.
I click those cells moving back up the page. nothing changes
When I click back onto cell F9 where I originally made the change, NOW I get the intended result.
I thought that as soon as made the change to F9 I should get that result. I don't know why I have to make the change in F9, click to another cell, and then click back to F9 to get the result.
Any help is appreciated.
Code:
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If Not Intersect(Target, Range("F6:F8")) Is Nothing Then
Call ApprVal
End If
Debug.Print "Updated Appr Value"
If Not Intersect(Target, Range("F8:F9")) Is Nothing Then
Call StateChanges
End If
Debug.Print "State Changed"
End Sub
This is the sub it calls
Code:
Sub PA_Drivers()
With Sheets("Drivers")
Cells(10, 6).Value = 0.01
End With
End Sub
Last edited: