The "fileformat" parameter tells Excel in what format to save the file, such
as in Text, Comma Separated Values, Excel95 and so on. Most of the time you
can omit this and save the file as a normal Excel xls file.
--
Cordially,
Chip Pearson
Microsoft Most Valuable Professional
Excel Product Group
Pearson Software Consulting, LLC
www.cpearson.com
(email on web site)
"Nils Titley" wrote in message
...
Dave,
wbnew.saveas filename:=newname, fileformat:=newname
It worked if I removed the " ,fileformat:=newname". What is that doing
and
why won't it work with it?
Thanks
"Dave Peterson" wrote:
Dim NewName as string
NewName = "C:\temp\lift logger\lift logger process " _
& format(date, "mmddyy") & ".xls"
application.displayalerts = false
wbnew.saveas filename:=newname, fileformat:=newname
application.displayalerts = true
========
If you didn't know the name of the workbook, you could strip the .xls
(and
mmddyy if you had it), too.
Nils Titley wrote:
I want to add a date at end of the file name. How do I do that?
Also I want to over write a file if it exist at this location but I
don't
want a box to pop up.
Dim WBNew As Workbook
WBNew.SaveAs "C:\Temp\Lift Logger\Lift Logger Process.xls"
Look like this: Lift Logger Process 031908.xls
Thanks
--
Dave Peterson