MSGBOX UPON ERROR

F

FARAZ QURESHI

Hello every1,

I am trying to write a code but also am facing error 1004 at quite some times.

Can anyone help me in writing a proper line of code for a Msgbox displayed
upon occurance of such an error and going to the end of the remaining code so
as to avoid debugging and reminding a simple mistake to be avoided.

Message Box Displaying "Please copy something first!"
 
C

Charles Chickering

Sub SimpleErrorHandling()
On Error GoTo ErrorHandler
'Your code

ErrorHandler:
MsgBox "Your Message"
End Sub
 
F

FARAZ QURESHI

Thanx Charles

No doubt found your xclent example better than two advices, pal!

Thanx again!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top