Does anyone know how to get a combo box to look up values in a certain sheet.
I have tried the following code:
Private Sub UserForm_Initialize()
rownumber = [A65536].End(xlUp).Row
rownumber = rownumber + 1
Dim wscell As Range
For Each wscell In Range("Client Details!A1:A25")
cboDetails.AddItem (wscell.Value)
Next
txtDate.SetFocus
End Sub
The sheet name is the Client Details. When I remove this reference the combobox works fine.
Thanks in advance
I have tried the following code:
Private Sub UserForm_Initialize()
rownumber = [A65536].End(xlUp).Row
rownumber = rownumber + 1
Dim wscell As Range
For Each wscell In Range("Client Details!A1:A25")
cboDetails.AddItem (wscell.Value)
Next
txtDate.SetFocus
End Sub
The sheet name is the Client Details. When I remove this reference the combobox works fine.
Thanks in advance