P paradise Member Sep 30, 2015 #1 Hi, How can I change the file name of my excelfile based on system date of computer.The prefix to system date would be in text(string). With Rgds, Suresh
Hi, How can I change the file name of my excelfile based on system date of computer.The prefix to system date would be in text(string). With Rgds, Suresh
chirayu Well-Known Member Sep 30, 2015 #2 If you mean when saving the file, you want to save filename with current date then it variable be something like below & use the variable with the SaveAs code to name your file Code: Dim MyFile As String MyFile = "Test " & Format(Date, "DD/MM/YYYY")
If you mean when saving the file, you want to save filename with current date then it variable be something like below & use the variable with the SaveAs code to name your file Code: Dim MyFile As String MyFile = "Test " & Format(Date, "DD/MM/YYYY")
P paradise Member Sep 30, 2015 #3 My file name say for e.g is 'Test' which is in certain folder. Is above is the complete code.If it is complete code then perhaps there is an error.
My file name say for e.g is 'Test' which is in certain folder. Is above is the complete code.If it is complete code then perhaps there is an error.
chirayu Well-Known Member Oct 1, 2015 #4 The above only defines your variable. You will need to use the variable along with the code for SaveAs macro (links below) http://www.rondebruin.nl/win/s5/win001.htm https://msdn.microsoft.com/en-us/library/office/ff841185.aspx
The above only defines your variable. You will need to use the variable along with the code for SaveAs macro (links below) http://www.rondebruin.nl/win/s5/win001.htm https://msdn.microsoft.com/en-us/library/office/ff841185.aspx