I have a Table in sheet "index" with column "Company" and i have a sheet for each company with the same name so i want to create a code with vba to get the companies names from this column and use it in array, i tried this code
Dim DirArray() As Variant
DirArray = Sheets("index").Range("B2:B5").Value
For Each sh In ActiveWorkbook.Sheets(DirArray(1, 1))
but i got an error so what is wrong and if i want to expand the Range limit to the last cell with value,
Can you please help me and if i want to use ListObjects to get the data from this Table can you point me to the right way.
Thank You
Dim DirArray() As Variant
DirArray = Sheets("index").Range("B2:B5").Value
For Each sh In ActiveWorkbook.Sheets(DirArray(1, 1))
but i got an error so what is wrong and if i want to expand the Range limit to the last cell with value,
Can you please help me and if i want to use ListObjects to get the data from this Table can you point me to the right way.
Thank You