This is the code I am using for the form.
Private Sub Thumb_Click()
'Automatic insert
On Error GoTo Err_Thumb_Click
RunCommand acCmdInsertObject
Exit_Thumb_Click:
Exit Sub
Err_Thumb_Click:
Const conErrDoCmdCancelled = 2501
If (Err = conErrDoCmdCancelled) Then
Resume Exit_Thumb_Click
Else
MsgBox Err.Description
Resume Exit_Thumb_Click
End If
End Sub
The problem is that after you insert an object and try to move onto anything else, the insert object dialog pops up again. Then after you cancel the second instance everything's happy! What am I missing here?
Private Sub Thumb_Click()
'Automatic insert
On Error GoTo Err_Thumb_Click
RunCommand acCmdInsertObject
Exit_Thumb_Click:
Exit Sub
Err_Thumb_Click:
Const conErrDoCmdCancelled = 2501
If (Err = conErrDoCmdCancelled) Then
Resume Exit_Thumb_Click
Else
MsgBox Err.Description
Resume Exit_Thumb_Click
End If
End Sub
The problem is that after you insert an object and try to move onto anything else, the insert object dialog pops up again. Then after you cancel the second instance everything's happy! What am I missing here?