sharky12345
Well-known Member
- Joined
- Aug 5, 2010
- Messages
- 3,422
- Office Version
- 2016
- Platform
- Windows
I'm using this to load a Listbox on a Userform with values where column H has 'Overdue' but the date is coming up in the US format, whereas I need it to be in UK format;
I've had this issue previously and had a solution provided but that was for a Listbox without criteria and can't work out how to amend it;
Is anyone able to show me how I can achieve this please?
Code:
With Me.ListBox1
.ColumnCount = 5
.ColumnWidths = "120,0,60,0,60"
End With
Set Rng = Range("D7:H57")
ReDim Ray(1 To 5, 1 To Rng.Count)
For Each Dn In Rng
If Dn.Value = "Overdue" Then
c = c + 1
For Ac = 1 To 5
Ray(Ac, c) = Dn.Offset(, -(5 - Ac))
Next Ac
End If
Next Dn
ReDim Preserve Ray(1 To 5, 1 To c)
Me.ListBox1.List = Application.Transpose(Ray)
I've had this issue previously and had a solution provided but that was for a Listbox without criteria and can't work out how to amend it;
With Me.ListBox1
.ColumnCount = 12
.ColumnWidths = "70,70,70,100,100,100,100,100,100,100,100,100"
.RowSource = Range(Range("A3"), Range("L" & Rows.Count).End(xlUp)).Address
End With
Is anyone able to show me how I can achieve this please?