Is there any way to execute a dblclick by using code. In the following code I allow the used to choose to instert an object if they respond yes but want to trigger a dblclick even if they do not.
Dim Msg, Style, Title, Help, Ctxt, Response, MyString
Msg = "Do you want to Insert an Object ?" ' Define message.
Style = vbYesNo + vbCritical + vbDefaultButton2 ' Define buttons.
Title = "Insert Object Option" ' Define title.
Help = "DEMO.HLP" ' Define Help file.
Ctxt = 1000 ' Define topic
' context.
' Display message.
Response = MsgBox(Msg, Style, Title, Help, Ctxt)
If Response = vbYes Then ' User chose Yes.
DoCmd.RunCommand acCmdInsertObject
Else ' User chose No.
' here i want to trigger the double click command'
Send DblClick
End If
Dim Msg, Style, Title, Help, Ctxt, Response, MyString
Msg = "Do you want to Insert an Object ?" ' Define message.
Style = vbYesNo + vbCritical + vbDefaultButton2 ' Define buttons.
Title = "Insert Object Option" ' Define title.
Help = "DEMO.HLP" ' Define Help file.
Ctxt = 1000 ' Define topic
' context.
' Display message.
Response = MsgBox(Msg, Style, Title, Help, Ctxt)
If Response = vbYes Then ' User chose Yes.
DoCmd.RunCommand acCmdInsertObject
Else ' User chose No.
' here i want to trigger the double click command'
Send DblClick
End If