[Help Request]Error

Posts 1–4 of 4 · Page 1 of 1
[Help Request]Error
Good night/day everybody.
I'm facing a problem, I have an application that I need to control...I mean, if a error happens I really need to be able to sort of stop the form , display a msgbox and avoid it from crashing, does the "on error goto" work here, if it does, how do I use it? Could you show me what to do and explain the steps, I don't want to copy and past it without understanding it..

Ty in advance!
Code:
Try
'your code here
Catch ex as exception
MsgBox(ex.tostring)
end try

For instance

Code:
Try
Timer1.Value = Textbox1.Text 'enter a letter in textbox1.text
catch ex as exception
Msgbox("Enter a valid number.")
End try
I cannot give you further assistance, unless you post your code.
Use the "catch as exception" to catch errors.

BTW I'm glad you don't wanna copy and paste things!
@blubb1337

Second one worked very well altough it wasn't for a timer, thank you!


@lolland
Thank you to anyways, and thanks for that "by the way" lol
Posts 1–4 of 4 · Page 1 of 1
This thread is closed for replies.

Similar Threads

Tags for this Thread

None

Need help?