LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 50
Default Save as question.

Cerberus,

Did you want the file path be locked or to give the user the functionality
of being able chose the locaction? is so then I have this code:

Sub saveme()

Application.EnableEvents = False

rtn = Application.Dialogs(xlDialogSaveAs).Show(arg1:=Thi sWorkbook.Sheets _
("Put your sheet name here").Range("Your cell ref").Value & ".xls")
If Not rtn Then Cancel = True
Cancel = True

Application.EnableEvents = True

End Sub

If you want to combine the values of more than 1 cell add this code after
..value and before & in the above code

& " " & Range("D7").Value

Hope this helps



"Cerberus" wrote:

Is there a way to save a file using a cell's information as the documents
name? I currently have it saving as a set name but now I'm wanting to roll
the project out but I need the documents name to be saved with a new name
everytime.

The code I have now is:

varDoc.ActiveDocument.SaveAs ("s:\Engineering\testWord.doc")

I would like to have the file saved in the same directory (s:\Engineering\)
but have the name reference Cell CONFIG!O220. Is that possible, or do any of
you have a better idea on how the save the file with unique document names.

Thanks for and help in advance.

 
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
Another Save Question Sandy Excel Worksheet Functions 1 May 19th 07 07:46 PM
Save & Save As Question Ray Batig Excel Programming 1 March 10th 06 03:16 AM
After Save - 1 more question Steph[_6_] Excel Programming 4 October 27th 05 08:17 PM
Another save as question FrigidDigit Excel Programming 1 May 23rd 05 08:56 PM
A save question: Phil Hageman Excel Programming 4 July 11th 03 05:11 PM


All times are GMT +1. The time now is 03:17 PM.

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

About Us

"It's about Microsoft Excel"