Name work sheet

  • Thread starter Thread starter oldjay
  • Start date Start date
O

oldjay

I am trying to name the only sheet in a workbook the days date.
This doesn't work. I guess if it worked I wouldn't be writing this.

oldjay


Sub Save_File_As1() '
Dim NewShtDate As String
Dim listnumber As String
NewShtDate = Format(Date, "mm-dd-yy")
ActiveSheet.SaveAs = NewShtDate
listnumber = InputBox("Please enter List number to save", "Customer's List",
"Word List " & NewShtDate)
List = "C:\Cora\" & listnumber & ".XLS"

ActiveWorkbook.SaveAs Filename:=List

End Sub
 
Try the below

Sub Save_File_As1() '
Dim listnumber As String

ActiveSheet.Name = Format(Date, "mm-dd-yy")
listnumber = InputBox("Please enter List number to save", _
"Customer's List", "Word List " & NewShtDate)
List = "C:\Cora\" & listnumber & ".XLS"
ActiveWorkbook.SaveAs Filename:=List

End Sub
 
Thanks

Jacob Skaria said:
Try the below

Sub Save_File_As1() '
Dim listnumber As String

ActiveSheet.Name = Format(Date, "mm-dd-yy")
listnumber = InputBox("Please enter List number to save", _
"Customer's List", "Word List " & NewShtDate)
List = "C:\Cora\" & listnumber & ".XLS"
ActiveWorkbook.SaveAs Filename:=List

End Sub
 
Back
Top