I have a problem where a combo box in a form won't populate from the VBA code in the initialise routine. I've tried a couple of difference methods for populating the combo box without success. The code I have is:
Code
Option Explicit
Sub NewTender()
Application.ScreenUpdating = False
On Error GoTo ErrHandler
Workbooks.Add template:="C:\Users\duncanc\Documents\Excel\Test file.xlt"
UserForm.Show
ErrHandler:
On Error Resume Next
Application.ScreenUpdating = True
End Sub
Private Sub UserForm_Initialise()
comboEstimator.List = Array("A Person", "Someone Else", "Another Person")
' With comboEstimator ' this with statement has been tried without success
' .Clear
' .AddItem "A Person" ' add names as required
' .AddItem "Someone Else"
' .AddItem "Another Person"
' End With
tbName.Value = ""
tbAddress.Value = ""
tbBuilder1.Value = ""
tbBuilder2.Value = ""
tbBuilder3.Value = ""
cb1.Value = False
cb2.Value = False
cb3.Value = False
cb4.Value = False
cb5.Value = False
cb6.Value = False
tbName.SetFocus 'Sets focus on NameTextBox
End Sub
Display More
I tried the excel file uploaded by Norie but it only displayed "Is". Are there any settings I need to modify to allow the add item property to work?