Hi again, and thanks so much. That worked great. If possible, could you
please tell me how to add a directory...meaning I would like to save it to a
different folder...directory is something like Departments/Cutting/Old
Schedules
Thank you much
> The following macro verifies that there is a date in B2 in the sheet named
> ABC, and if not it uses the current date. The date is formatted as text with
[quoted text clipped - 33 lines]
> > Does anyone know if I can create a macro that will save my file with the
> > name and date located in cell b2? Thank you in advance.
Aaron - 21 Mar 2006 17:01 GMT
Oops, I figured it out...just needed to insert the chdir. Thanks much,
Aaron
> Hi again, and thanks so much. That worked great. If possible, could you
> please tell me how to add a directory...meaning I would like to save it to a
[quoted text clipped - 40 lines]
> > > Does anyone know if I can create a macro that will save my file with the
> > > name and date located in cell b2? Thank you in advance.
Kevin B - 21 Mar 2006 17:06 GMT
You can create a string and contcatenate the path to the filename.
Declare a string variable, named strPath in my example and assign the path
string to the variable. Be sure to include the backslash at the end of the
path.
Dim strPath as string
strPath = "C:\Documents\Excel\My Data\"
Then modify the command that saves the file to:
ActiveWorkbook.SaveAs Filename:=strPahtName & strFileName

Signature
Kevin Backmann
> Hi again, and thanks so much. That worked great. If possible, could you
> please tell me how to add a directory...meaning I would like to save it to a
[quoted text clipped - 40 lines]
> > > Does anyone know if I can create a macro that will save my file with the
> > > name and date located in cell b2? Thank you in advance.