Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I have a userform with the following code attached to an image:
Private Sub Image1_DblClick(ByVal Cancel As MSForms.ReturnBoolean) IsKeyPressed If Ctrl = True Then MsgBox "You double clicked the image" & vbNewLine & "while holding the Ctrl key.", vbInformation, "Control Return Issue" DoEvents Else: MsgBox "You double clicked the image.", vbInformation, "Control Return Issue" End If End Sub In both cases when the code has completed control is not returned to the userform until the user mouse clicks the form once. There are additional buttons on the form, but even when I add a setFocus command following the msgbox, the button is focused, but still needs the extra mouse click to be operable. I have tried adding the DoEvents command, but it still does not return control to the userform. Am I missing something? If so, could somebody please point out where I'm wrong? |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Selecting control on userform with part of control name (set question) | Excel Programming | |||
Control Sequence from Userform Control | Excel Programming | |||
Userform control | Excel Programming | |||
Userform control | Excel Programming | |||
Keep userform visible, but return control to calling routine | Excel Programming |