H
have_a_cup
When using a Dim statement, is there any way to declare a generic value,
so that if there aren't actually 10 workbooks, the macro just ends...or,
how do I get around the run time 1004 error from happening / displaying
alert????
Dim x As Integer
Dim WB As String
For x = 1 To 10
WB = "G:\myFolder\TEST\RBA\RBA " & x & ".xls"
Workbooks.Open Filename:=WB
Next
End Sub
so that if there aren't actually 10 workbooks, the macro just ends...or,
how do I get around the run time 1004 error from happening / displaying
alert????
Dim x As Integer
Dim WB As String
For x = 1 To 10
WB = "G:\myFolder\TEST\RBA\RBA " & x & ".xls"
Workbooks.Open Filename:=WB
Next
End Sub