PC Review


Reply
Thread Tools Rate Thread

Automatically open a drop down list

 
 
=?Utf-8?B?TERNdWVsbGVy?=
Guest
Posts: n/a
 
      12th Nov 2007
I was wondering if there was VBA code I could write so that when the focus is
on a combo box which has a drop down list that the drop down list would
automatically open so the user wouldn't have to click on the drop down arrow
to see the list.

Any guidance would be greatly appreciated!

Thanks!
 
Reply With Quote
 
 
 
 
John Spencer
Guest
Posts: n/a
 
      12th Nov 2007
In the GotFocus event, you should need one line of code.

Private Sub Combo6_GotFocus()
Me.Combo6.Dropdown

End Sub

--
John Spencer
Access MVP 2002-2005, 2007
Center for Health Program Development and Management
University of Maryland Baltimore County
..

"LDMueller" <(E-Mail Removed)> wrote in message
news:0C20349C-6D28-453A-B883-(E-Mail Removed)...
>I was wondering if there was VBA code I could write so that when the focus
>is
> on a combo box which has a drop down list that the drop down list would
> automatically open so the user wouldn't have to click on the drop down
> arrow
> to see the list.
>
> Any guidance would be greatly appreciated!
>
> Thanks!



 
Reply With Quote
 
Stefan Hoffmann
Guest
Posts: n/a
 
      12th Nov 2007
hi,

LDMueller wrote:
> I was wondering if there was VBA code I could write so that when the focus is
> on a combo box which has a drop down list that the drop down list would
> automatically open so the user wouldn't have to click on the drop down arrow
> to see the list.

I personally don't like such a behavior.

> Any guidance would be greatly appreciated!


Private Sub yourComboBox_GotFocus()

yourComboBox.DropDdwn

End Sub



mfG
--> stefan <--
 
Reply With Quote
 
=?Utf-8?B?TERNdWVsbGVy?=
Guest
Posts: n/a
 
      12th Nov 2007
Perfect, Thank you!

LDMueller

"John Spencer" wrote:

> In the GotFocus event, you should need one line of code.
>
> Private Sub Combo6_GotFocus()
> Me.Combo6.Dropdown
>
> End Sub
>
> --
> John Spencer
> Access MVP 2002-2005, 2007
> Center for Health Program Development and Management
> University of Maryland Baltimore County
> ..
>
> "LDMueller" <(E-Mail Removed)> wrote in message
> news:0C20349C-6D28-453A-B883-(E-Mail Removed)...
> >I was wondering if there was VBA code I could write so that when the focus
> >is
> > on a combo box which has a drop down list that the drop down list would
> > automatically open so the user wouldn't have to click on the drop down
> > arrow
> > to see the list.
> >
> > Any guidance would be greatly appreciated!
> >
> > Thanks!

>
>
>

 
Reply With Quote
 
=?Utf-8?B?TERNdWVsbGVy?=
Guest
Posts: n/a
 
      12th Nov 2007
Also perfect, Thank you!

LDMueller

"Stefan Hoffmann" wrote:

> hi,
>
> LDMueller wrote:
> > I was wondering if there was VBA code I could write so that when the focus is
> > on a combo box which has a drop down list that the drop down list would
> > automatically open so the user wouldn't have to click on the drop down arrow
> > to see the list.

> I personally don't like such a behavior.
>
> > Any guidance would be greatly appreciated!

>
> Private Sub yourComboBox_GotFocus()
>
> yourComboBox.DropDdwn
>
> End Sub
>
>
>
> mfG
> --> stefan <--
>

 
Reply With Quote
 
Gary Walter
Guest
Posts: n/a
 
      12th Nov 2007

"LDMueller" wrote:
>I was wondering if there was VBA code I could write so that when the focus
>is
> on a combo box which has a drop down list that the drop down list would
> automatically open so the user wouldn't have to click on the drop down
> arrow
> to see the list.
>

Hi LD,

In addition to John's sage advice,
in certain, particular situations I have
used below code to simulate "mouse-over"
, i.e., when user runs mouse over the
combobox, it automatically drops down,
and then dropdown disappears when cursor
goes ouside boundary of combobox.

for example, in the MouseMove event
of a combobox named "cmboLink"

Private Sub cmboLink_MouseMove(Button As Integer, Shift As Integer, x As
Single, y As Single)
Me!cmboLink.SetFocus
Me!cmboLink.Dropdown
End Sub

Used in the wrong situation I could imagine it would really *annoy*
your users though...

good luck,

gary


 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
produce list automatically from choice of drop down list David Microsoft Excel Misc 1 8th Mar 2010 07:15 PM
automatically selecting items in drop down list Tom Mucciolo Microsoft Excel Misc 5 2nd Sep 2008 04:31 AM
Drop Down List Not Updating Automatically =?Utf-8?B?UkJhbg==?= Microsoft Excel Misc 1 23rd Jun 2006 07:27 PM
how to have drop down list update automatically =?Utf-8?B?TWFyaSBCZXRo?= Microsoft Outlook Contacts 0 19th Aug 2005 05:08 PM
Drop-down list - process automatically. Jeff Smith Microsoft Excel Worksheet Functions 3 22nd Jul 2004 04:48 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 11:20 PM.