VBA - Passing Array of dates to Combobox / Listbox
Posted on 2010-04-10
I have a list of dates in a range on a worksheet that I use to populate a combobox. I have formatted the dates as "dd-mmm-yy". When it gets passed to the control, it loses the formatting I prefer and instead formats as "dd/mm/yyyy".
I hope I am being stupid and there is an easy property somewhere that allows me to switch such that it sticks with the format I prefer, but regardless, does anyone have any suggestions as to how to pass the dates to the listbox (other than one at a time as a string), to avoid the change in formatting.
Just for reference the code I am using is as follows:
varImport = Application.WorksheetFunction.Transpose(wksMain.Range("Import_Qtrs").Value)
frmSelectQtrs.cmbQtr1.List = varImport