Hello,
I've been trying to get the right code to close multiple workbooks from inside a macro, using a FOR loop. I have say Book1.xls ... Book10.xls and I want to substitute the numeral in the following code by the i-th value but haven't been able to:
For i = 1 To 10
Windows("Book1.xls").Activate
ActiveWorkbook.Close
Next i
Please help with the code...
I've been trying to get the right code to close multiple workbooks from inside a macro, using a FOR loop. I have say Book1.xls ... Book10.xls and I want to substitute the numeral in the following code by the i-th value but haven't been able to:
For i = 1 To 10
Windows("Book1.xls").Activate
ActiveWorkbook.Close
Next i
Please help with the code...