Archive of Mr Excel Message Board


Back to Controls in Excel archive index
Back to archive home

combobox problem

Posted by zen on June 26, 2001 4:37 PM
i've got userform with a combobox on it, the data for the box is on the sheet, x1:x31 which is custom date values "dddd mm dd yy", in the combo box it's default at formula(now(), "dddd mm dd yyy"), when i call up an item from the list it is converted back to the General Number format, how do i get vb to change it into the format i require??

thanks in advance

zen


Re: combobox problem

Posted by Russell on June 26, 2001 9:48 PM
You can do something like this:

Private Sub ComboBox1_Change()
ComboBox1.Value = Format(ComboBox1.Value, "dddd mm dd yyyy")
End Sub

Hope this helps,

Russell


This archive is from the original message board at www.MrExcel.com.
All contents © 1998-2004 MrExcel.com.
Visit our online store to buy searchable CD's with thousands of VBA and Excel answers.
Microsoft Excel is a registered trademark of the Microsoft Corporation.
MrExcel is a registered trademark of Tickling Keys, Inc.