Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
lunker55
 
Posts: n/a
Default Save a new file with the name that is in cell "C7"

Here is what I want to do:
Open up a template. Enter information. Click on save, and when the window
shows up asking me to name the file, I want it to automatically use a file
name with the value in cell C7.

As an example, if cell C7 has "Milton 287-12", I want to automatically name
the file"Milton 287-12" when I save for the first time.
Is this possible?
Thanks,
Joe


  #2   Report Post  
Peter Rooney
 
Posts: n/a
Default

Hi, Lunker,

Try pasting the following code into a macro sheet and running it with Alt-F8
Change the path to whatever you require between the quote in line 3 and "A1"
to whatever cell you want to use to contain the filename.

Have a good weekend

Pete

Sub SaveAsCellString()
ActiveWorkbook.SaveAs Filename:= _
"D:\" & Range("A1").Formula, FileFormat:=xlExcel9795, _
Password:="", WriteResPassword:="", ReadOnlyRecommended:=False, _
CreateBackup:=False
End Sub


"lunker55" wrote:

Here is what I want to do:
Open up a template. Enter information. Click on save, and when the window
shows up asking me to name the file, I want it to automatically use a file
name with the value in cell C7.

As an example, if cell C7 has "Milton 287-12", I want to automatically name
the file"Milton 287-12" when I save for the first time.
Is this possible?
Thanks,
Joe



  #3   Report Post  
lunker55
 
Posts: n/a
Default

Works perfectly!!
Thank you very much Peter.

Joe

"lunker55" wrote in message
.. .
Here is what I want to do:
Open up a template. Enter information. Click on save, and when the window
shows up asking me to name the file, I want it to automatically use a file
name with the value in cell C7.

As an example, if cell C7 has "Milton 287-12", I want to automatically
name the file"Milton 287-12" when I save for the first time.
Is this possible?
Thanks,
Joe




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
Excel is not asking to save a changed file when the file is closed Ron Excel Discussion (Misc queries) 2 March 14th 05 01:05 AM
Excell2003 (SP-1) File > Save and File > Save As.. grayed out Joe Murphy Excel Discussion (Misc queries) 0 March 9th 05 10:00 PM
Automatically save file based on cell value Craig Excel Discussion (Misc queries) 0 February 27th 05 10:01 PM
Click on X in upper right corner should save FIRST the file you se Thorkild Excel Discussion (Misc queries) 1 December 6th 04 11:54 PM
GET.CELL Biff Excel Worksheet Functions 2 November 24th 04 07:16 PM


All times are GMT +1. The time now is 06:15 AM.

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"