Y
YY san.
Dear all experts,
I am totally new to VBA. I have make use of a set of code provided by Mr.
Paul Sheppard. But I am encountering errors.
What I want to do is:
To update the 13 worksheet's name referencing to another file called Staff
Names for timesheet.xls, worksheet name called "IT" and from cell b2 ~ B14
This Staff Names for timesheet.xls path is C:\Document folder\Timesheet
Sub namesheets()
Dim arr As Variant
arr = Workbooks("Staff Names for
timesheet.xls").Worksheet("IT").Range("b2:b14").Value
For i = LBound(arr) To UBound(arr)
Sheets(i + 1).Activate
Sheets(i).Name = arr(i, 1)
Next i
End Sub
This is definitely a simple questions to the experts out there, appreciate
very much.
Thanks!
I am totally new to VBA. I have make use of a set of code provided by Mr.
Paul Sheppard. But I am encountering errors.
What I want to do is:
To update the 13 worksheet's name referencing to another file called Staff
Names for timesheet.xls, worksheet name called "IT" and from cell b2 ~ B14
This Staff Names for timesheet.xls path is C:\Document folder\Timesheet
Sub namesheets()
Dim arr As Variant
arr = Workbooks("Staff Names for
timesheet.xls").Worksheet("IT").Range("b2:b14").Value
For i = LBound(arr) To UBound(arr)
Sheets(i + 1).Activate
Sheets(i).Name = arr(i, 1)
Next i
End Sub
This is definitely a simple questions to the experts out there, appreciate
very much.
Thanks!