newVBuser
Programmer
- Jan 5, 2009
- 3
Hello,
I am quite new to this so bare with me...
I have some code which works but I would like to add an error checking facility...
I wont go into detail on the code as I dont think it is necessary and I think all I require is something simple.
I have an user input box where the user enters a name, the code then checks that this name exists in a table, and contines if it does and throws an end/debug error if it isnt. Is there any way I can catch this error and replace it with a simple user-friendly message?
I currently have:
MyTable.MyField = InputBox("Enter heading name: ")
I then want something thing like...
If an exception is thrown
msgbox "error: please try again"
Exit sub
Else
contine...
Just something simple like that if it is possible.
Cheers guys.
I am quite new to this so bare with me...
I have some code which works but I would like to add an error checking facility...
I wont go into detail on the code as I dont think it is necessary and I think all I require is something simple.
I have an user input box where the user enters a name, the code then checks that this name exists in a table, and contines if it does and throws an end/debug error if it isnt. Is there any way I can catch this error and replace it with a simple user-friendly message?
I currently have:
MyTable.MyField = InputBox("Enter heading name: ")
I then want something thing like...
If an exception is thrown
msgbox "error: please try again"
Exit sub
Else
contine...
Just something simple like that if it is possible.
Cheers guys.