vb.net, system.Nullreferenceexception in mscorlib.dll

  • Thread starter Thread starter ramakrishnads
  • Start date Start date
R

ramakrishnads

Hi,
I need an urgent help.
I am developing a windows application in vb.net, using arcobjects.
I am getting an error when i am exiting the application.
I am using "End" to exit the application, but i am getting an error as:


"An unhandled exception of type 'System.NullReferenceException'
occurred in mscorlib.dll"
Additional information: Object reference not set to an instance of an
object.

Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles Button2.Click

MsgBox(" Thank you ", MsgBoxStyle.OKOnly)

End

End Sub
 
I'm not usrw hy you use End, but have you tried using Me.Close instead
(assuming you only have the one form open)?
 
Okay, so I can't type; here's what the post should look like ;-):

I'm not sure why you use End, but have you tried using Me.Close instead
(assuming you only have the one form open)?
 
Back
Top