View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Paul Martin Paul Martin is offline
external usenet poster
 
Posts: 114
Default Userform Advice/Help

Hi Pete

You'll need to set your ComboBox ColumnCount property to 2, and
RowSource to A1:E40. This will populate the ComboBox.

On the ComboBox_Change() event, you'll need something like:

Dim iRow as Integer

iRow = ComboBox.ListIndex + 1
txtbox1.Value = Cells(iRow, 1).Value
txtbox2.Value = Cells(iRow, 2).Value
txtbox3.Value = Cells(iRow, 3).Value
etc

If you have a CommandButton to save the textbox values to the
worksheet, on the Button_Click() event put:

Dim iRow as Integer

iRow = ComboBox.ListIndex + 1
Cells(iRow, 1).Value = txtbox1.Value
Cells(iRow, 2).Value = txtbox2.Value
etc

Regards

Paul Martin
Melbourne, Australia