Hi All,
i have the below code to open a list of files in certain directories, but the obstacle i have is that i have some files zipped. Is there a way to recode the below for it to open the zip file and just open the file i specified?
thanks
i have the below code to open a list of files in certain directories, but the obstacle i have is that i have some files zipped. Is there a way to recode the below for it to open the zip file and just open the file i specified?
thanks
VBA Code:
Sub Open_Workbooks()
'this works
Dim lastrow As Integer
Dim inarr() As Variant
Dim sh As Worksheet
Dim i As Long
Application.DisplayAlerts = False
Set sh = ThisWorkbook.Sheets("Sheet1")
lastrow = Cells(Rows.Count, "Q").End(xlUp).Row ' find last row in column J
inarr = Range(Cells(2, 17), Cells(lastrow, 17)) ' load all the data from J8 to the bottom in a variant array
For i = 1 To UBound(inarr, 1) ' loop through all the entries in column J
Workbooks.Open inarr(i, 1)
Application.DisplayAlerts = True
Next i
MsgBox "All Files needed for Annual Pay is open."
End Sub