Problem with add-in button exectution

Problem with add-in button exectution

Anonymous
Not applicable
195 Views
0 Replies
Message 1 of 1

Problem with add-in button exectution

Anonymous
Not applicable

I have created an add-in that loads a form. The
problem I am having is everytime I press the space bar after exectuting the
button a new instance of the form appears. I want only 1 instance of the form to
be able to be open at a time. Please help

 

        Private
Sub oButtonProps_OnExecute(ByVal Context As Inventor.NameValueMap) Handles
oButtonProps.OnExecute
           
On Error GoTo err_oButtonProps

 


size=2>            Dim
oDoc As
Document
           
On Error Resume
Next
            oDoc
=
Inv.ActiveDocument
           
If Err.Number
Then
               
Exit Sub
           
End If

 


size=2>           
'  Check if File is read only and see if user wants to check
out
            Dim RO
As String
           
RO = ROnly(oDoc.FullDocumentName)

 


size=2>            If RO
= 0 Or RO = 2 Or RO = 32 Or RO = 34
Then
           
Else
               
Check_Out()
           
End If

 


size=2>           
mIV_Properties = New
IV_Properties
           
mIV_Properties.Visible =
True
           
mIV_Properties.Show()
           
mIV_Properties = Nothing

 


size=2>err_oButtonProps:
        End
Sub

 

Scott A. McCoy
0 Likes
196 Views
0 Replies
Replies (0)