Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 74
Default saving files

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
  #2   Report Post  
Posted to microsoft.public.excel.programming
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



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 74
Default saving files

thanks Tom,
Your information is always very helpful.
Wish I had the working knowledge of this that you do.

--
dr chuck


"Tom Ogilvy" wrote:

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




Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Saving files clzob Excel Discussion (Misc queries) 1 September 18th 09 03:35 AM
Saving files colleen Excel Discussion (Misc queries) 1 March 2nd 07 05:52 AM
Closing files and saving files dan Excel Worksheet Functions 0 August 15th 06 04:07 AM
Saving csv files Steve Excel Discussion (Misc queries) 2 July 20th 05 06:43 PM
Saving files Cindy Excel Programming 2 August 18th 04 12:47 PM


All times are GMT +1. The time now is 07:58 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"