Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Auto Select Next Item in Combo Box


Hi,

I know this is pretty simple but I'm struggling with it. I want to b
able to click on a command button and the combo box automatically jump
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.
Jod

--
ssjod
-----------------------------------------------------------------------
ssjody's Profile: http://www.excelforum.com/member.php...fo&userid=3339
View this thread: http://www.excelforum.com/showthread.php?threadid=56481

  #2   Report Post  
Posted to microsoft.public.excel.programming
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


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Auto Select Next Item in Combo Box


Worked Perfectly Tom!

Thanks!
Jody


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

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
I need a specific value in auto filter to fill a combo box and than match the select value in 2 other columns. Marc Excel Worksheet Functions 0 May 22nd 06 08:41 PM
combo box not showing selected item.. nycdon Excel Programming 1 August 17th 05 06:28 PM
Assign macro to each item of a drop-down list or combo box - how? jbp20717[_3_] Excel Programming 1 July 27th 05 11:17 AM
How to clear all item from a combo box? 39N95W Excel Programming 8 July 19th 04 07:31 AM
Combo Box Item alfaboost Excel Programming 7 January 10th 04 06:31 PM


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