0

Good Afternoon StackOverflow gang,

I'm currently in the process of fully automating my VBA script, however I've hit a slight bump. The following portion of my script take the date in a specific cell, and translates it farther down the script. The purpose of this portion of the script is to fully run the other macros below when it detects a change that has been made to the cell. It works on first run, but deletes the date located in A1 the second time I make a change to it. Any thoughts as to why this is occurring, or has anyone found structural errors when looking at this?

Private Sub Worksheet_Change(ByVal Target As Range)
    If Intersect(Target, Me.Range("A1")) Is Nothing Then Exit Sub
    Application.EnableEvents = False 'to prevent endless loop

    Call Execute

    MsgBox "The Date Has Changed!"

    Application.EnableEvents = True

End Sub
E. Weglarz
  • 37
  • 1
  • 7

0 Answers0