G
Guest
I use the code below to open workbooks and fill and array. Unfortunately the
workbook names change. I have 50 workbooks that I extract data from. Can
someone please assist me in adjusting the code so that is opens the books
regardless of the names and then fills the array regardless of the name.
' Opens the Tracker workbooks for each unit
Dim strPath As String
strPath = "\\sphere\Obit\"
Workbooks.Open strPath & "D40.xls"
Workbooks.Open strPath & "DLP.xls"
Workbooks.Open strPath & "WS_234.xls"
Workbooks.Open strPath & "POD.xls"
Workbooks.Open strPath & "POD2.xls"
Workbooks.Open strPath & "GLOB34.xls"
' Establishes an array
Dim Tracker_Array As Variant
Tracker_Array = Array("D40.xls", "DLP.xls", "WS_234.xls", "POD.xls",
"POD2.xls", "GLOB34.xlsâ€)
Thanks for your assistance
Bill
workbook names change. I have 50 workbooks that I extract data from. Can
someone please assist me in adjusting the code so that is opens the books
regardless of the names and then fills the array regardless of the name.
' Opens the Tracker workbooks for each unit
Dim strPath As String
strPath = "\\sphere\Obit\"
Workbooks.Open strPath & "D40.xls"
Workbooks.Open strPath & "DLP.xls"
Workbooks.Open strPath & "WS_234.xls"
Workbooks.Open strPath & "POD.xls"
Workbooks.Open strPath & "POD2.xls"
Workbooks.Open strPath & "GLOB34.xls"
' Establishes an array
Dim Tracker_Array As Variant
Tracker_Array = Array("D40.xls", "DLP.xls", "WS_234.xls", "POD.xls",
"POD2.xls", "GLOB34.xlsâ€)
Thanks for your assistance
Bill