Logo 
Search:

MS Office Answers

Ask Question   UnAnswered
Home » Forum » MS Office       RSS Feeds
  Question Asked By: Carol Garcia   on Jan 07 In MS Office Category.

  
Question Answered By: Trae Thompson   on Jan 07

I think there's a problem with the save  as bit. I'm assuming you want to
save the file  "SalesData 20060811.xls".

I'd get the date  sorted and into a variable before trying the save as
bit.

So add
Dim vDate as String
vDate = Format(Date, "yyyymmdd")

and then change the Wk.SaveAs Filename:="C:\MyData\SalesData.xls"
Format=
(Date, "yyyymmdd") & ".xls"
to
Wk.SaveAs Filename:="C:\MyData\SalesData " & vDate & ".xls",
FileFormat:=xlNormal

which will give you filename  as above for an Excel file (the xlNormal
bit).

Share: 

 
 
Didn't find what you were looking for? Find more on Need help with a Save as maco Or get search suggestion and latest updates.


Tagged: