View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Tom Ogilvy Tom Ogilvy is offline
external usenet poster
 
Posts: 6,953
Default Auto Select Next Item in Combo Box

Private Sub CommandButton1_Click()
Dim idx as Long
idx = Combobox1.ListIndex
if idx < combobox1.Listcount - 1 then
Combobox1.ListIndex = idx + 1
else
Combobox1.ListIndex = 0
end if
end Sub

--
Regards,
Tom Ogilvy


"ssjody" wrote:


Hi,

I know this is pretty simple but I'm struggling with it. I want to be
able to click on a command button and the combo box automatically jumps
to the next item in the list. How can I do this?

Here is some "Hillbilly" code for what I am trying to accomplish:

Private Sub CommandButtonAdd_Click()
Set wa = Me.ComboBoxJumpToPart.Value
Set wb = Range("PartsList")
'find the (wa) .value in (wb)
'and set (wa) to the next item in the (wb) list.
End Sub

Any help is appreciated.
Jody


--
ssjody
------------------------------------------------------------------------
ssjody's Profile: http://www.excelforum.com/member.php...o&userid=33398
View this thread: http://www.excelforum.com/showthread...hreadid=564819