I may be naive, but I expected that the default setting for pressing "Cancel" on a message box would be to exit sub. That's not the case! ? Nothing happens and it just continues on. Is there some code I need to add to get the program to end sub when "Cancel" is pressed?
Here's one of the little pieces of code with an inputbox. I have many of them throughout a few different macros.
Here's one of the little pieces of code with an inputbox. I have many of them throughout a few different macros.
VBA Code:
UserID = InputBox("Enter the username you'd like to add training status for.", vbOKCancel)
DateID = InputBox("Enter the first day of the month you'd like to add training for.", vbOKCancel)
ThisWorkbook.Sheets("Training").Range("I2").Value = UserID
ThisWorkbook.Sheets("Training").Range("J2").Value = DateID