Help With Simple Combobox Programming

  • Thread starter Thread starter MAB
  • Start date Start date
M

MAB

I have a combo box on sheet1. When the user clicks on the combo box the
first time ( it gets focus ) It should add/load all items from sheet2 column
A. Now when the user selects from the combobox that item should be
copied/placed on sheet1.A5 similarly the next item selected in the combo box
should be placed below A6 and so on

How can this be accomplished with code

thx
 
Hi,



Use code like that :





Private Sub cboIn_Click()

Dim intR As Integer

intR = Range("a4").CurrentRegion.Rows.Count

Range("a4").Offset(intR, 0).Value = cboIn.Value

End Sub



Private Sub cboIn_GotFocus()

Dim rg As Range

cboIn.Clear

For Each rg In Worksheets("sheet4").Range("a1").CurrentRegion

cboIn.AddItem rg.Text

Next rg

End Sub
 
Back
Top