LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27
Default Help in VBA.

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").Va lue
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!
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +1. The time now is 03:27 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"