Good morning
Thank you for taking the time to read my post.
I'm successfully populating a listbox in a userform with the contents of a defined table using:
ListBox1.List = Sheet1.ListObjects("Table1").DataBodyRange.Value2
However, I can't figure out how to populate a second list box in the form using a variable
Dim x as ListObject
Set x = Sheet1.ListObjects("Table2")
I don't have any idea how to make this next line correct:
ListBox2.List = x.DataBodyRange.Value2
Many thanks
Thank you for taking the time to read my post.
I'm successfully populating a listbox in a userform with the contents of a defined table using:
ListBox1.List = Sheet1.ListObjects("Table1").DataBodyRange.Value2
However, I can't figure out how to populate a second list box in the form using a variable
Dim x as ListObject
Set x = Sheet1.ListObjects("Table2")
I don't have any idea how to make this next line correct:
ListBox2.List = x.DataBodyRange.Value2
Many thanks