![]() |
![]() |
|
|||||||
| Excel Questions All Excel/VBA questions - formulas, macros, pivot tables, general help, etc. Please post to this forum in English only. |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
New Member
Join Date: Mar 2002
Location: n/a
Posts: 6
|
I had a look in your tips of the week and found this:
Public Sub SaveAsA1() ThisFile = Range("A1").Value ActiveWorkbook.SaveAs Filename:=ThisFile End Sub but this names the workbook and not the sheet. I suppose there is a code to name the 'sheet' also, possibly? does anyone know what it is or how to record the macro. thanks to anyone who has the answer. chiao dj_dafad [ This Message was edited by: dj_dafad on 2002-04-11 07:16 ] |
|
|
|
|
|
#2 |
|
Board Regular
Join Date: Mar 2002
Posts: 363
|
Try this:
Sub RenameSheets() Dim sht As Worksheet For Each sht In Worksheets sht.Name = sht.Cells(1, 1).Value Next End Sub
__________________
It's never too late to learn something new. Ricky |
|
|
|
![]() |
| Bookmarks |
| Thread Tools | |
| Display Modes | |
|
|