Hi All,
When trying to put an array in a IF = False then statement it is giving me a "Compile error Type Mismatch" error. Does anyone have an Idea?, I can get around this by removing the If statement or array...
Code below:
Thanks,
Ed
When trying to put an array in a IF = False then statement it is giving me a "Compile error Type Mismatch" error. Does anyone have an Idea?, I can get around this by removing the If statement or array...
Code below:
VBA Code:
Dim Viia7Files() As Variant
Dim wb As Workbook
Dim wb2 As Workbook
Dim I As Integer
Set wb = ThisWorkbook
Viia7Files = Application.GetOpenFilename("Excel Files (*.xls*),*.xl*", , "Choose File", "Open", True)
If Viia7Files = False Then Exit Sub
Else
For I = 1 To Application.CountA(Viia7Files)
Set wb2 = Workbooks.Open(Viia7Files(I))
End If
Thanks,
Ed