Please can you alter the following VBA to do the following: After I enter the date value…
- User
Please can you alter the following VBA to do the following: After I enter the date value in A10, pop up a Yes No message "Confirm that the following Dates are correct" double line break "Start Date: "value in A8, double line break "End Date: "value in A10, vbCritical, "CONFIRM DATES" If No, wsBooking.Range("A8").ClearContents wsBooking.Range("A10").ClearContents wsBooking.Range("A8").Select Wait one second MsgBox("Please re-enter correct dates."), vbInformation "CORRECT DATES" and exit sub If Yes, continue with code
' Check if the changed cell is A10 If Target.CountLarge > 1 Then Exit Sub If Not Intersect(Target, wsBooking.Range("A10")) Is Nothing Then ThisWorkbook.Sheets("Booking").Unprotect Password:="edit" Application.EnableEvents = False
wsBooking.Range("A12").ClearContents wsBooking.Range("A14:A25").ClearContents wsBooking.Range("A27").ClearContents wsBooking.Range("A28").ClearContents wsBooking.Range("A12").Select Application.EnableEvents = True ThisWorkbook.Sheets("Booking").Protect Password:="edit" End If
- Assistant