Got error 0 when trying to run program by exe and no error when run it buy code

When i run program exe and change the general tab text value and click on other tab without saving it show run time error 0.
But if i do same thing when i run program by code it doesn't show any error.
Nitin RawatAsked:
Who is Participating?
 
Martin LissConnect With a Mentor Older than dirtCommented:
It would be a big help if you were to zip up and attach your project, but if I have to guess I'd say that you have an error routine at the bottom of some sub or function, but you don't have it preceded by an Exit Sub (or Function). For example if line 7 were missing you'd get error 0 when the sub was run.

Private Sub Example()

    On Error GoTo ErrorRoutine

    ' some code

    Exit Sub

ErrorRoutine:

    MsgBox Err.Number
End Sub

Open in new window

0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.