I am having issues getting my combo boxes to populate. I have used: How to add items to a combobox in a form in excel VBA?
I have also made sure that my lists are named on that worksheet. What am I doing wrong?
Here is the code for the initialization
Private Sub UserForm1_Initialize()
'Import Combo Box Lists
Dim cCart As Range
Dim cLoc As Range
Dim wsz As Worksheet
Set wsz = Worksheets("Stockout Reference")
For Each cLoc In wsz.Range("Location")
With Me.Location
.AddItem cLoc.Value
End With
Next cLoc
For Each cCart In wsz.Range("CartName")
With Me.Cart
.AddItem cCart.Value
End With
Next cCart
Me.txtDate1.Value = Format(Date, "Medium Date")
End Sub
I do have code for the userform that follows this, but none of the variables are the same so I don't see how that could be an issue.