RawlinsCross
Active Member
- Joined
- Sep 9, 2016
- Messages
- 437
I have a listbox of 9 columns that has a fair number of listing in it (enough that I wouldn't want to cycle through the entire listbox row by row). I want to dump the contents to a range, do a sort, and reload it into the listbox. Two of the columns (5 & 6) are in the format "dd-mmm-yy AM/PM" (e.g. 01-Jan-21 3:10 PM).
I normally would push the listbox data to an array and paste to the range:
vArray = Me.ListBox1.List
rRange = vArray
but this converts the dates to yyyy-mm-dd AM/AM (e.g. 2021-01-01 3:10PM using the example above). How can I retain the original date formatting?
I normally would push the listbox data to an array and paste to the range:
vArray = Me.ListBox1.List
rRange = vArray
but this converts the dates to yyyy-mm-dd AM/AM (e.g. 2021-01-01 3:10PM using the example above). How can I retain the original date formatting?