Error Message Passing Throughout Nested Components

Error Message Passing Throughout Nested Components

Nowadays, components are popularly used in VB projects. These components can sometimes make it hard to determine which component has an error when the application stops running. This is especially true with nested components in a project.
By following the structure below to develop your nested components, you can obtain detailed error information from your application. This allows you to determine, without having to work through your code, which method in which component has the error.
Component creation:

  '/----------------------------------------------------------- ' Component1 ' Public Sub GetName(ByRef strName As String) On Error GoTo EndOfSub     Dim objComponent2 As New Component2  'create Component2     Dim strErrMsg As String     Dim lYourErrorNumber As Long     strErrMsg =


Share the Post: