Reputation: 51
Hi I'm trying to write a code that when a date is entered on a certain column it will call a macro at a specific time, like lets say today's date was entered on column M (which will trigger the change event) then at 5:30pm it will call a macro.
I have the coding for the change event, but I don't know how to code it to only call the Macro at a specific time.
Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Cells.count > 1 Then Exit Sub
If Target.Column = 5 Then
If Target.Value = Date Then 'If the target value is today
Call Lilly
End If
End If
End Sub
Upvotes: 0
Views: 199
Reputation: 17627
Use the Application.OnTime()
method to schedule another procedure for a set time.
Upvotes: 2