Worksheet.Name Property (Excel)
Returns or sets a String value that represents the object name.
Syntax
식 .Name
식 A variable that represents a Worksheet object.
Example
Sample code provided by: Bill Jelen, MrExcel.com | About the Contributor
The following code example sets the name of the active worksheet equal to today's date.
' This macro sets today's date as the name for the current sheet
Sub NameWorksheetByDate()
Range("D5").Select
Selection.Formula = "=text(now(),""mmm dd yyyy"")"
Selection.Copy
Selection.PasteSpecial Paste:=xlValues
Application.CutCopyMode = False
Selection.Columns.AutoFit
ActiveSheet.Name = Range("D5").Value
Range("D5").Value = ""
End Sub
About the Contributor
MVP인 Bill Jelen은 Microsoft Excel에 대한 서적을 다수 집필했습니다. 또한 Leo Laporte와 함께 TechTV에 고정 출연하고 있으며, Excel과 관련한 30만 건 이상의 질문과 대답이 제공되는 MrExcel.com(영문일 수 있음)의 운영자이기도 합니다.