Hi
I get the error Subscript out of range in the below code. What is wrong with it? Thank you
Option Explicit
Sub test()
Dim i As Integer
For i = 1 To 6
ThisWorkbook.Worksheets(1).Cells(i, 1).Value = Workbooks(2).Worksheets(i).Name
Next
End Sub
I get the error Subscript out of range in the below code. What is wrong with it? Thank you
Option Explicit
Sub test()
Dim i As Integer
For i = 1 To 6
ThisWorkbook.Worksheets(1).Cells(i, 1).Value = Workbooks(2).Worksheets(i).Name
Next
End Sub