Ark68
Well-known Member
- Joined
- Mar 23, 2004
- Messages
- 4,570
- Office Version
- 365
- 2016
- Platform
- Windows
I have a dynamic range of cells (rng_sstart), that when one of the cells in that range changes, wish to run some code.
This is what isn't working for me:
This code will not change if I change a value within the range defined by rng_sstart.
Thoughts
This is what isn't working for me:
VBA Code:
Private Sub Worksheet_Change(ByVal Target As Range)
Dim rng_sstart As Range
If Not mbevents Then Exit Sub
With ws_gui1
Set rng_sstart = .Range("BD4:BD" & .Cells(.Rows.Count, "BD").End(xlUp).Row)
If Not Intersect(Target, rng_sstart) Is Nothing Then 'CHANGE in staff start
tgt_r = .Range(Target.Address).Row
MsgBox "Staff Start - Row: " & tgt_r & Chr(13) & " - Check for valid time value." & Chr(13) & " - Check against end time."
mbevents = True
Stop
End If
End With
This code will not change if I change a value within the range defined by rng_sstart.
Thoughts