Refer to Workbook by Index Number
I want to refer to several workbooks, named from 1 to 10 (for example). I don´t know if it´s possible to do something like refering to workbooks (like refering to sheets) with an Index number. Something like this:
Sub ReferWorkbook()
'
For k = 1 To 10
Worksheets(k).Activate
Sheets("Sheet1").Select
Selection.Copy
Sheets("Sheet2").Select
ActiveSheet.Paste
Next k
End Sub
Re: Refer to Workbook by Index Number
Thread moved to 'Office Development/VBA' forum (note that the "VB Editor" in Office programs is actually VBA rather than VB, so the 'VB6' forum is not really apt)
Re: Refer to Workbook by Index Number
you could do like
for each wb in workbooks