
Originally Posted by
EdwardMartin
I had this Excel crash problem as well. It seems the crash was caused by having the Listbox.RowSource set to the table or range while the code was doing the update work to that table or range.
The crash stopped when I set the Listbox.RowSource to "", updated the data, and then reconnected the Listbox.RowSource to the range. I am actually setting the RowSource = to a ListObject.
Hello, I am sorry for necroing the thread - how exactly does one do that? I am having the exact same issue, using listbox Rowsource and having runtime error.
Private Sub AddDataToListBox()
'grab the range
Dim rg As Range
Set rg = GetRange()
'link the range to the list box
With ListBoxArtikel
.RowSource = rg.Address(external:=True)
.ColumnCount = rg.Columns.Count
.ColumnWidths = "30;100;80;310;0;0;70;70;70;70;70;70;70;70;70;0;0;0;0;0;0;0"
.ColumnHeads = True
.ListIndex = 0
End With
End Sub
So I should have "" instead of "rg.Address(external:=True)", and then somehow update it afterwards? How?
Thank you for any help.
Bookmarks