additem to a combobox from other excel worksheet

  • Thread starter Thread starter gelu
  • Start date Start date
G

gelu

Hello every body

Can someone help me,

I would like to fill a combobox located in an excel whorksheet with th
data from other worksheet.

Ej Worksheet 1 whit the combobox1

Worksheet 2 with the data (A1:A100)

I have tried to initialize but it does not run and


thanks in advanc
 
Private Sub Userform_Initialize()
Combobox1.List = Worksheets("Sheet2").Range("A1:A100").Value
End Sub

if the combobox is on a worksheet, do it in the workbook open event

Private Sub Workbook_Open()
Worksheets("Sheet1").Combobox1.List = _
Worksheets("Sheet2").Range("A1:A100").Value
End Sub
 
Back
Top