Am looking for a way to have the combobox on my userform to have a default value of nothing or something like "Choose From Below".
Have tried various google suggestions but the value that shows in my combobox is blank if it's the first iteration of the code, or worse, the previously chosen value.
Code is below...
' Begin Code
Private Sub UserForm_Initialize()
Dim RngTags As Range, RngNames As Range, i As Long
ComboBox1.Value = "SomeText"
'Set rng1 = Sheets("Admin").Range("deptrange2")
Set rng1 = Range("ALLDEPT")
With ComboBox1
.ColumnCount = 1
.Style = fmStyleDropDownList
.TextAlign = fmTextAlignLeft
.BoundColumn = 1
For i = 1 To rng1.Count
.AddItem rng1(i).Value
.List(.ListCount - 1, 1) = rng1(i).Value
Next i
End With
End Sub
' Puts the value chosen from the list on admin f6
Private Sub ComboBox1_Change()
Sheets("Admin").Range("f8").Value = ComboBox1.Value
Call myUnLoad
End Sub
' Gets rid of userform
Sub myUnLoad()
UserForm1.Hide
End Sub
' End code
Thanks
Andrew