![]() |
Name work sheet
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 |
Name work sheet
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 -- Jacob "oldjay" wrote: 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 |
Name work sheet
Thanks
"Jacob Skaria" wrote: 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 -- Jacob "oldjay" wrote: 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 |
All times are GMT +1. The time now is 04:49 AM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com