C
Cameron
Hi All,
Have created a form with a combo box and have populated the box with the
following code ...
Private Sub UserForm_Activate()
Dim cell As Range
ComboBox1.RowSource = ""
With Worksheets("Extra Tables")
For Each cell In .Range("Doctors")
If Len(Trim(cell.Text)) > 0 Then
ComboBox1.AddItem cell.Value
End If
Next
End With
End Sub
Problem I've noticed is that preliminary testing, the list keeps being added
to by the list is the Named Range "Doctors" - Very stumped on how to resolve
this.
Also, how do I go about deleting the record (rpw) from the Named Range
"Doctors" after selection??
Cheers,
Cameron
Have created a form with a combo box and have populated the box with the
following code ...
Private Sub UserForm_Activate()
Dim cell As Range
ComboBox1.RowSource = ""
With Worksheets("Extra Tables")
For Each cell In .Range("Doctors")
If Len(Trim(cell.Text)) > 0 Then
ComboBox1.AddItem cell.Value
End If
Next
End With
End Sub
Problem I've noticed is that preliminary testing, the list keeps being added
to by the list is the Named Range "Doctors" - Very stumped on how to resolve
this.
Also, how do I go about deleting the record (rpw) from the Named Range
"Doctors" after selection??
Cheers,
Cameron