General discussion


Excel Macros - using SaveAs=ThisFile

By autumncrest ·
I have a file that I want to save each day with the name of the file and the date listed in the file, such as "Company-030106". I know I can do this with the following code:

ThisFile = Range("A1").Value
ActiveWorkbook.SaveAs Filename:=ThisFile

However, I want to save the file in a different directory. When I use the above code, it wants to put the file in the directory that Excel is currently using. So, for example, it may save it on my Desktop if I last went to File, Open and opened a file on the desktop. How do I get the file that I want to save into a certain directory using the "ThisFile" coding above?

This conversation is currently closed to new comments.

Thread display: Collapse - | Expand +

All Comments

Related Discussions

Related Forums