Q:

(Excel) Add items to Userform combo box

I currently have an Excel spreadsheet which is created to gather my sales staff's time sheet for the day. There are a few things I'd like to do:

I have created a Userform with the required details within the form, but the items in Combo box do not show. Here's the code for it    
Private Sub ComboBox1_Change()
'combobox1_list
.AddItem "PRA110AC"
.AddItem "RAH111AC"
.AddItem "RAJ112AC"
.AddItem "MAL113AC"
.AddItem "Extern"

End Sub

I want this data to be pooled to another sheet within the same workbook under appropriate headers. I also want this to be a hidden sheet as this is confidential.

I am new to this so I may have messed this up, but I guess I get a chance ;)

A:

I believe you are in the incorrect Private sub. You are using the event "Change" in the private sub "ComboBox_1." You should be using the event "Initialize" (this event starts when the userform is loaded) in the private sub "Userform" to populate your ComboBox before you see the form. Here's how it should look:
Private Sub Userform_Initialize()

    With Combobox1
         .AddItem "PRA110AC"
         .AddItem "RAH111AC"
         .AddItem "RAJ112AC"
         .AddItem "Extern"
    End With
End Sub

I hope this helps! 

