View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
BrianB BrianB is offline
external usenet poster
 
Posts: 1
Default Combobox with Commandbutton in Userform!

Set the combobox rowSource property to C9:C63.

Use this code in the form :-

'-----------------------------------------------------
Private Sub UserForm_Initialize()
Me.ComboBox1.ListIndex = 0
End Sub
'---------------------------------------

Private Sub CommandButton1_Click()
x = Me.ComboBox1.ListIndex
Me.ComboBox1.ListIndex = IIf(x = 54, 0, x + 1)
End Sub
'--------------------------------------

--
Message posted from http://www.ExcelForum.com