sharky12345
Well-known Member
- Joined
- Aug 5, 2010
- Messages
- 3,422
- Office Version
- 2016
- Platform
- Windows
I am loading a Listbox on a Userform like so;
Most of the time it works fine, but regularly it gives me an error when I try to load it, this comes after I have changed sheet values - the error is simply;
I have a possible solution suggested after a Google search which is to set the Listbox to load from an array but I have no idea how to do this if someone can help?
Code:
With Me.ListBox1
.ColumnCount = 10
.ColumnHeads = True
.ColumnWidths = "40;50;110;60;55;60;60;60;0;0"
.RowSource = Sheet1.Range("A2:M" & LastRow).Address(, , , True)
End With
Most of the time it works fine, but regularly it gives me an error when I try to load it, this comes after I have changed sheet values - the error is simply;
2147467259 (80004005) Could not set the rowsource property - Unspecified Error
I have a possible solution suggested after a Google search which is to set the Listbox to load from an array but I have no idea how to do this if someone can help?