MxDocument_OpenDocument() Question

722
4
Jump to solution
12-11-2012 07:11 AM
MichelleCouden1
Occasional Contributor III
I am trying to open a form at the startup of an mxd file. My form name is frmMapSetUp. I understand the Private Function under the ThisDocument but I am having trouble with the code on opening the form. I don't have a message box I just want the form to open. Please help!! Thanks!!
0 Kudos
1 Solution

Accepted Solutions
MichelleCouden1
Occasional Contributor III
All fixed Thanks!!

View solution in original post

0 Kudos
4 Replies
PeterYurkosky1
Occasional Contributor
Try this:

Private Function MxDocument_OpenDocument() As Boolean

    Dim frm As frmMapSetUp
    Set frm = New frmMapSetUp
    frm.Show

End Function
0 Kudos
MichelleCouden1
Occasional Contributor III
I'm getting that it needs on object??

Option Explicit

Private Function MxDocument_OpenDocument() As Boolean
  
      Dim frm As frmMapSetUp
      Set frm = New frmMapSetUp
      frm.Show
     
End Function
0 Kudos
KenBuja
MVP Esteemed Contributor
deleted...read the question incorrectly
0 Kudos
MichelleCouden1
Occasional Contributor III
All fixed Thanks!!
0 Kudos