I have an if statement which checks if a value has been entered and if it hasnt it pops up with a message box and tells the user.
Now if the if statement is in the same Sub as the code that is executing it works fine, but if i put it into a seperate sub and call it from within the original sub it still executes the original code:
If AppVariables.CustName = "" Then MsgBox("You have to configure this report before it can be run." & (Chr(13)) & (Chr(10)) & "Go to Configuration > Configure to resolve this", MsgBoxStyle.Critical) Return End If
Now since i have put it into the seperate sub and the ok/cancel button is pressed it still continues with the rest of the code and of course fails as not all information has been entered.
I wondered if anyone could help