hairyfingers
10-15-2014, 02:42 AM
Hi
This is doing my head in!
if I create a simple userform and insert a listbox then on the initilize code enter:
Private Sub UserForm_Initialize()
With ListBox1
.RowSource = "a1:a3"
.Value = ListBox1.List(2)
End With
End Sub
then in cell a1:a3 enter the letters A, B, and C respectively
the form works.
however if I change cells a1:a3 to 31/3/14, 31/3/15, 31/3/16 (three dates in the UK format) then the form does not work. it falls apart on the .value property.
if I delete the .value property the form intiailizes but for some reason with it in it cannot identify the item at position 3 in the list to be the default selection.
RARR!!!!
why is this????
This is doing my head in!
if I create a simple userform and insert a listbox then on the initilize code enter:
Private Sub UserForm_Initialize()
With ListBox1
.RowSource = "a1:a3"
.Value = ListBox1.List(2)
End With
End Sub
then in cell a1:a3 enter the letters A, B, and C respectively
the form works.
however if I change cells a1:a3 to 31/3/14, 31/3/15, 31/3/16 (three dates in the UK format) then the form does not work. it falls apart on the .value property.
if I delete the .value property the form intiailizes but for some reason with it in it cannot identify the item at position 3 in the list to be the default selection.
RARR!!!!
why is this????