I am building an application that accepts input entered into textboxes, then checks the input for negative values, etc. before writing it to a file. If the data does not meet the conditions, a message box pops up letting the user know. The problem I am having is that after it checks the data and displays the message box, it continues to save the input to the file anyway. How do I make it only write to the file if all the data meets my conditions? I apologize if this seems really basic, I am in my first year of a programming course!
I am building an application that accepts input entered into textboxes, then checks the
Share
Well, you could do it like this:
“Exit Sub” will exit the current subroutine (function) and not do the code you will place behind the if-block.