Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 441
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 644
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4,391
Default 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
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
Want to scroll with mouse through drop down list akina Excel Discussion (Misc queries) 0 September 23rd 08 08:56 PM
Is there any way to reset scroll down menus using a button? Excelishard New Users to Excel 2 May 3rd 06 05:33 AM
Using mouse wheel to scroll drop down rfielack Excel Discussion (Misc queries) 0 January 14th 06 10:01 PM
create macro - allow user to scroll down drop down items w/ mouse MarthaSue Excel Programming 2 June 30th 05 04:58 AM
Button to stay on screen as you scroll fred Excel Programming 4 February 10th 05 01:37 PM


All times are GMT +1. The time now is 05:37 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"