Click here to Skip to main content
13,300,654 members (50,871 online)
Click here to Skip to main content
Add your own
alternative version


9 bookmarked
Posted 4 Sep 2005

Error Handling In Visual Basic Projects

, 15 Oct 2007
Rate this:
Please Sign up or sign in to vote.
Insert Error Hanler In Your Visual Basic Projects Easily

Download Error Handler (Right Click And Select Save Target As... )

URL For Download:


When A System Developed By Programmer The Important Step IS Supporting System and

Debugging System The most Popular Step Is Reporting Bugs By Users That Using This Systems But Somtimes Users Dont Reports Error.

My End Goal Of This Error Handler Program Is Help to VB system Developers To Reporting This Bugs. This System Is Very UseFull Tools For This Idea.It Is Inserts Error HAndler Tag In Vb Forms By This Error Handling You Can see Which User Have Error and What Is The error Descrpition And Which Module Or form Or UserControl Or Reports Has erros And In This Form Or UserControl Or Reports Which Function Or Sub Has errors .

You Can Remove This Error Handler TAg After Inserting Easily.

I Use This Syetem In Four Big Syestem Like Accounting... And I Acquiesce from This Tool

Please Send Me your FeedBack About This Program To Improve It.

Thank you

ErrorHandling Main Maenu

Error Handler Config Menu

Sample Code Before Change

Private Sub Form_Load()
'My Code Starts here

'My code end Here

End Sub

Sample Code After Inserting Error Handler

Private Sub Form_Load()
On Error GoTo Err_Label: '*ErrorHandler Tag*'
Dim StrSubName As String '*ErrorHandler Tag*'
Dim ErrorDescription As String '*ErrorHandler Tag*'
StrSubName = "Form_Load" '*ErrorHandler Tag*'
Me.MousePointer = 11 '*ErrorHandler Tag*'

'My Code Starts here

'My code end Here

Me.MousePointer = 1 '*ErrorHandler Tag*'
Exit Sub '*ErrorHandler Tag*'
Err_Label: '*ErrorHandler Tag*'

ErrorDescription = Me.Name + "-->" + StrSubName + "-->" + Err.Description '*ErrorHandler Tag*'
MsgBox ErrorDescription + vbCrLf + "Please Contact With Your System Administrator", vbCritical, "ERROR HANDLER" '*ErrorHandler Tag*'
MousePointer = 1 '*ErrorHandler Tag*'
ErrorDescription = Replace(ErrorDescription, "'", " ") '*ErrorHandler Tag*'
MainConnection.Execute "INSERT INTO Errors_Log (ComputerName,Error_Date,Error_Time,UserName,Error_Description) VALUES ('" + sGetComputerName + "','" & Date & "','" & Time & "','" & CurUser & "','" & ErrorDescription & "')" '*ErrorHandler Tag*'
End Sub

Houshang Karami


My Email Is:


This article has no explicit license attached to it but may contain usage terms in the article text or the download files themselves. If in doubt please contact the author via the discussion board below.

A list of licenses authors might use can be found here


About the Author

hooshang Karami
Web Developer
Iran (Islamic Republic of) Iran (Islamic Republic of)
i am programmer and i am programming 10 year
I am VB Progarammer Webdevelpoer Intranet Site Developer Programmer
in SqlServer DatabAse
I am Developing Accounting System And Sell Systems
In C# Or In SqlServer 2000 ,
I like Programming And I live With Programming
iran tehran

You may also be interested in...


Comments and Discussions

GeneralYour Answers Pin
hooshang Karami4-Sep-05 18:44
memberhooshang Karami4-Sep-05 18:44 
Question??? Pin
pgiustinoni4-Sep-05 5:56
memberpgiustinoni4-Sep-05 5:56 
AnswerRe: ??? Pin
Jim Crafton4-Sep-05 9:34
memberJim Crafton4-Sep-05 9:34 
GeneralRe: ??? Pin
hooshang Karami14-Apr-07 1:00
memberhooshang Karami14-Apr-07 1:00 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.

Permalink | Advertise | Privacy | Terms of Use | Mobile
Web03 | 2.8.171207.1 | Last Updated 16 Oct 2007
Article Copyright 2005 by hooshang Karami
Everything else Copyright © CodeProject, 1999-2017
Layout: fixed | fluid