nadzri
New Member
- Joined
- Oct 4, 2005
- Messages
- 38
Hi all,
I tried to do this in a userform:
-Display a date value of cell "a1" of "try" sheet in combobox1
-when arrow is press down, combobox display date list from c1:c10
-when new date selected, date cell in "a1" value is changed accordingly
I got all solved by changing the combobox properties:
controlsource: =a1
rowsource: =c1:c10
But i cannot get the date format correctly. When I search the forum i got this:
Private Sub ComboBox1_Change()
ComboBox1.Value = Format(ComboBox1.Value, "dd/mm/yyyy")
End Sub
But when new date is selected, it display an error message:
"Run-time error '380': Could not set the Value property. Invalid property value."
What should I do?
Thanks,
I tried to do this in a userform:
-Display a date value of cell "a1" of "try" sheet in combobox1
-when arrow is press down, combobox display date list from c1:c10
-when new date selected, date cell in "a1" value is changed accordingly
I got all solved by changing the combobox properties:
controlsource: =a1
rowsource: =c1:c10
But i cannot get the date format correctly. When I search the forum i got this:
Private Sub ComboBox1_Change()
ComboBox1.Value = Format(ComboBox1.Value, "dd/mm/yyyy")
End Sub
But when new date is selected, it display an error message:
"Run-time error '380': Could not set the Value property. Invalid property value."
What should I do?
Thanks,