• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

How to do Error handling for a sample Excel vba code?

Hi ravikumar00008,


The basic structure of a macro to handle errors is as follows:


Sub MyMacro()


On Error GoTo ErrorHandler

. . .

Exit Sub


ErrorHandler:

. . .

Resume <or Exit Sub>

. . .


End Sub


Following is an example for your reference:


http://www.vbaexpress.com/kb/getarticle.php?kb_id=189


Hope this helps.


In case you want a specific answer for your dataset which you might be working with, please consider uploading a file along with a short description of your key requirement.


Regards,

Kaushik
 
Back
Top