Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() I have a Workbook with 13 sheets, the first is a Control sheet. On the control sheet I have a button (Macro details below) which when clicked should rename the other 12 sheets according to data in cells A4:A15 Sub namesheets_as_per_list_on_worksheet() Dim arr As Variant arr = Range("a4:a15").Value For i = LBound(arr) To UBound(arr) Sheets(i + 1).Activate Sheets(i).Name = arr(i, 1) Next i End Sub The conrtrol sheet is the first sheet in the workbook, and gets renamed when I run the macro, whilst sheet 13 does not change. What changes does the Macro require so that it renames sheets 2-13, ignoring sheet 1 the control sheet -- Paul Sheppard ------------------------------------------------------------------------ Paul Sheppard's Profile: http://www.excelforum.com/member.php...o&userid=24783 View this thread: http://www.excelforum.com/showthread...hreadid=398905 |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Macro needed | New Users to Excel | |||
Macro Help Needed - Excel 2007 - Print Macro with Auto Sort | Excel Worksheet Functions | |||
Macro needed to Paste Values and prevent Macro operation | Excel Discussion (Misc queries) | |||
Macro needed to Paste Values and prevent Macro operation | Excel Discussion (Misc queries) | |||
Macro Needed Please | Excel Programming |