Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 57
Default combobox close on mouse move


Is it possible for a combobox dropdown list to close (as if a selection was
made), if the mouse moves out of the list. I notice the pointer chances from
a cross to the normal pointer as the mouse moves off the list.

I would ideally like to mimic a mouse clixk on the top item if the mouse
moves off the list.

Hope this is clear


Thanks


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default combobox close on mouse move



You may get a better answer, but I don't think you can use the
_MouseMove to get what you want.

You can experiment with the events of a combobox by creating one on a
worksheet and then creating the event subs for the events you want to
learn about. At the top of the worksheet code put:

Public lEvent as Long

Then add to to the event sub some code like:

Private Sub ComboBox1_MouseMove(ByVal Button As Integer, ByVal Shift As
Integer, ByVal X As Single, ByVal Y As Single)

lEvent = lEvent + 1
Debug.Print "mouse moved " & CStr(lEvent)

End Sub

Then, postion the VB IDE Immediate window where you can see it and
still be able to interact with the combo box on the worksheet and watch
which events your actions trigger.

In this case, the _MouseMove fires repeatedly as the mouse moves around
inside the combo box after the choices have been displayed, but stops
firing when the mouse moves out of the combobox border.

You may be able to do what you want with the _LostFocus event which
fires after the combo box has been selected and then the user clicks off
it onto a worksheet cell or some other control.

Hope this helps...


--
jamescox
------------------------------------------------------------------------
jamescox's Profile: http://www.thecodecage.com/forumz/member.php?userid=449
View this thread: http://www.thecodecage.com/forumz/sh...d.php?t=112648

Reply
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
Mouse Move K[_2_] Excel Programming 0 December 11th 08 11:32 AM
mouse focusing in close button in preview window tom taol Excel Programming 0 December 18th 07 06:08 AM
can't move UserForm with the mouse Axel Excel Programming 2 July 1st 07 09:47 AM
Is clicking on the tab with my mouse the only way to move from on. Elizabeth Excel Worksheet Functions 2 March 21st 05 06:43 PM
Excel ComboBox mouse scroll Rory[_4_] Excel Programming 2 June 7th 04 12:51 PM


All times are GMT +1. The time now is 02:45 PM.

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

About Us

"It's about Microsoft Excel"