How to display a dialog box

  • Thread starter Thread starter DVN
  • Start date Start date
D

DVN

I need to add code to display a dialog box (or similar)
saying that the module was halted because the user entered
something wrong. Can someone give me code to display a
dialog box and halt the script?

Thanks
 
Maybe something like

if [describe error] then
MsgBox "An input error was detected."
Exit Sub
end if

in lieu of exit sub, you might include a line such as

GoTo TryAgain

where TryAgain: is a label you inserted just before the
part of your code that prompts for the user input

-Hope this helps.
 
Back
Top