Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I am struggling to find a method to display dates correctly in a
listbox. I populate the listbox with the following code. Private Sub testlist() Dim rng As Range Dim cw Dim colcnt As Integer Dim rowcnt As Integer colcnt = ActiveSheet.UsedRange.Columns.Count rowcnt = ActiveSheet.UsedRange.Rows.Count str = "a2:g" & rowcnt Set rng = Range(str) With ListBox1 .ColumnCount = colcnt .ColumnHeads = True .RowSource = rng.Address cw = "" For i = 1 To .ColumnCount cw = cw & rng.Columns(i).Width & ";" Next .ColumnWidths = cw .ListIndex = 0 End With End Sub The problem is that column g on the worksheet contains dates and these are being displayed as values in the listbox. The format I want to used is "DD/MM/YYYY". Any help will be greatly appriciated. Nigel Brown Theisen Securities. |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
How to find a value with multi-column, multi-record list | Excel Worksheet Functions | |||
Multi-column conditional formatting | Excel Discussion (Misc queries) | |||
Multi-field listbox in an Excel form | Excel Discussion (Misc queries) | |||
match in multi-column and multi-row array | Excel Discussion (Misc queries) | |||
Formatting Listbox | Excel Discussion (Misc queries) |