Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Scroll through items in a drop down from a button.
I am using Office 2003 on Windows XP.
I have a dropdown control on a custom toolbar that is populated with some items. I also have a button, which when the user clicks it, I would like the next item in the drop down to become selected (like a scrolling button), so the user can quickly scroll through the list, making each next item the item selected in the drop down. The user also needs to be able to access the drop down in the customary way. Can someone please post example code to do this? Thanks. |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Scroll through items in a drop down from a button.
Sub IncrementCombo()
With Application.CommandBars("Your ToolBar").Controls("Your ComboBox") .ListIndex = .ListIndex + 1 End With End Sub Try that Charles quartz wrote: I am using Office 2003 on Windows XP. I have a dropdown control on a custom toolbar that is populated with some items. I also have a button, which when the user clicks it, I would like the next item in the drop down to become selected (like a scrolling button), so the user can quickly scroll through the list, making each next item the item selected in the drop down. The user also needs to be able to access the drop down in the customary way. Can someone please post example code to do this? Thanks. |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Scroll through items in a drop down from a button.
You should put a check for the end of the list to start at the top again, or
stop at the bottom Sub IncrementCombo() With Application.CommandBars("Your ToolBar").Controls("Your ComboBox") If .ListIndex = .ListCount-1 then .ListIndex =0 Else .ListIndex + 1 End If End With End Sub NickHK "Die_Another_Day" wrote in message ups.com... Sub IncrementCombo() With Application.CommandBars("Your ToolBar").Controls("Your ComboBox") .ListIndex = .ListIndex + 1 End With End Sub Try that Charles quartz wrote: I am using Office 2003 on Windows XP. I have a dropdown control on a custom toolbar that is populated with some items. I also have a button, which when the user clicks it, I would like the next item in the drop down to become selected (like a scrolling button), so the user can quickly scroll through the list, making each next item the item selected in the drop down. The user also needs to be able to access the drop down in the customary way. Can someone please post example code to do this? Thanks. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Want to scroll with mouse through drop down list | Excel Discussion (Misc queries) | |||
Is there any way to reset scroll down menus using a button? | New Users to Excel | |||
Using mouse wheel to scroll drop down | Excel Discussion (Misc queries) | |||
create macro - allow user to scroll down drop down items w/ mouse | Excel Programming | |||
Button to stay on screen as you scroll | Excel Programming |