G
Guest
dear sir
In my vb.net window application i have the MDI form MainMDI and child form form1 adn module as MainModule
In my MainMDI Parent form i have one toolbar i.e. tbraction. I am trying to show the toolbar when i am displaying form1 (child form) . when i close the child form i want it to be hiddeni.e. invisible
i wrote the code in MainModule as
Friend Module MainModule
Friend frmMDI As MainMDI
End Module
and in the child form closed event i wrote:
Private Sub form1_Closed(ByVal sender As Object, ByVal e As System.EventArgs) Handles MyBase.Closed
On Error GoTo errHandler
frmMDI.tbrAction.Visible = False
Exit Sub
errHandler:
If Err.Number <> 0 Then
MsgBox(Err.Number & vbCrLf & Err.Description)
End If
but while accessing the code it give me error
Error 91
Object reference not set to an instance of the object
Please let me know how to solve this error.
thanks
Mustafa
In my vb.net window application i have the MDI form MainMDI and child form form1 adn module as MainModule
In my MainMDI Parent form i have one toolbar i.e. tbraction. I am trying to show the toolbar when i am displaying form1 (child form) . when i close the child form i want it to be hiddeni.e. invisible
i wrote the code in MainModule as
Friend Module MainModule
Friend frmMDI As MainMDI
End Module
and in the child form closed event i wrote:
Private Sub form1_Closed(ByVal sender As Object, ByVal e As System.EventArgs) Handles MyBase.Closed
On Error GoTo errHandler
frmMDI.tbrAction.Visible = False
Exit Sub
errHandler:
If Err.Number <> 0 Then
MsgBox(Err.Number & vbCrLf & Err.Description)
End If
but while accessing the code it give me error
Error 91
Object reference not set to an instance of the object
Please let me know how to solve this error.
thanks
Mustafa