LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 18
Default Return Control to Userform

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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Selecting control on userform with part of control name (set question) Keith Excel Programming 4 January 10th 07 02:24 PM
Control Sequence from Userform Control Nigel Excel Programming 3 December 29th 04 01:25 PM
Userform control ZMore Excel Programming 1 March 5th 04 11:34 PM
Userform control Phillips Excel Programming 1 November 20th 03 07:33 PM
Keep userform visible, but return control to calling routine Ryan Poth[_2_] Excel Programming 0 August 21st 03 05:28 AM


All times are GMT +1. The time now is 08:25 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"