Thread: Files SAVE AS
View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.programming
Gord Dibben Gord Dibben is offline
external usenet poster
 
Posts: 22,906
Default Files SAVE AS

The / is an illegal character.

Suggest "mmddyy" or "mdyy"


Gord Dibben MS Excel MVP

On Sun, 2 Mar 2008 12:11:01 -0800, JLGWhiz
wrote:

I assume you mean that myFile is a variable containing the file name. If so,

ActiveWorkbook.SaveAs FileName:= myFile & "-" & _
Format(Now, "m/d/yy") & ".xls"

This puts a - between the file name and date.

"Rpettis31" wrote:

I am trying to write a macro that will allow me to save a file as a "myfile,
plus the current date in xls. The macro has already converted the "myfile"
from a text format.