AnsweredAssumed Answered - err: "object reference not set to an instance of an object"

Question asked by geonetadmin on Dec 30, 2010
Latest reply on Jan 3, 2011 by helenchu
Original User: helenchu

I'm trying to write some code in  I run into error right at the beginning.  The error is "object reference not set to an instance of an object".  What I tried to do is to have a button (for editing), that button will open a form with users' input.  What do I miss?  Thank you very much for your help.

This is what I have:

Protected Overrides Sub OnClick()
Dim myForm As New frmMyform
End Sub


Public Class frmMyform
    Private m_application As ESRI.ArcGIS.Framework.IApplication 'replace m_PApp with m_application
    Private m_pDoc As ESRI.ArcGIS.ArcMapUI.IMxDocument
    Private m_pEditor As ESRI.ArcGIS.Editor.IEditor

Private Sub cmdBlkNum_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cmdBlkNum.Click
     Dim pEditor As IEditor
     Dim pUID As New UID
     Dim pEditLayers As IEditLayers
     Dim pMap As IMap

     pUID.Value = "esriEditor.Editor"
     pEditor = m_application.FindExtensionByCLSID(pUID)
end sub
end class