Name work sheet

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
 
J

Jacob Skaria

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
 
O

oldjay

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top