Thread: saving files
View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Tom Ogilvy Tom Ogilvy is offline
external usenet poster
 
Posts: 27,285
Default saving files

Yes, you have to do a saveas to rename a file

Dim s as String, bk as Workbook
s = Range("mnf").Value & Range("lot").Value & _
Format(Range("exp").Value,"mmddyyyy") & ".xls"
set bk = Workbooks.Add()
bk.SaveAs Thisworkbook.Path & "\" & s

--
Regards,
Tom Ogilvy

"dr chuck" wrote in message
...
I would like to open a new xls file using the contents of 3 named ranges on
the current worksheet as the name of the new file.

The named range "mnf" "lot" and "exp"
ie (mnf=john, lot =gh , exp=09022006)

I would like to get the file name to be "mnf""lot""exp".xls
(ie johngh09022006.xls)

Any suggestions? Do i have to open a unnamed file then name it when i save
it?

ty for any help

dr chuck