#1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3
Default SaveCopyAs

I am working with the code "SaveCopyAs" and have run in to
a wall. What I want is when I click on a button in my
document; I want excel to ask if the user wants to save
the document and if so, save it as a user defined name and
location. I know I could set the original as read-only
but I do not want to do that.

Private Sub Save_As_Click()

Workbooks("Master Template v2.1.XLS").SaveCopyAs

End Sub

This is the code I have so far but do not know what to
place after "SaveCopyAs"
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7,247
Default SaveCopyAs

Greg,

You have to include the full save-as file name after SaveCopyAs.
E.g,

Workbooks("Master Template v2.1.XLS").SaveCopyAs _
"C:\Temp\MasterBackup.xls"


--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com




"Greg Hadrych" wrote in
message ...
I am working with the code "SaveCopyAs" and have run in to
a wall. What I want is when I click on a button in my
document; I want excel to ask if the user wants to save
the document and if so, save it as a user defined name and
location. I know I could set the original as read-only
but I do not want to do that.

Private Sub Save_As_Click()

Workbooks("Master Template v2.1.XLS").SaveCopyAs

End Sub

This is the code I have so far but do not know what to
place after "SaveCopyAs"



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 923
Default SaveCopyAs

Take at look at.....

Application.GetSaveAsFilename

Cheers
Nigel

"Greg Hadrych" wrote in message
...
I am working with the code "SaveCopyAs" and have run in to
a wall. What I want is when I click on a button in my
document; I want excel to ask if the user wants to save
the document and if so, save it as a user defined name and
location. I know I could set the original as read-only
but I do not want to do that.

Private Sub Save_As_Click()

Workbooks("Master Template v2.1.XLS").SaveCopyAs

End Sub

This is the code I have so far but do not know what to
place after "SaveCopyAs"



  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default SaveCopyAs

Thanks for the help ... seeing as how i know very little
about coding, where would i but that string of code?
Right afer what i have or somewhere else?
-----Original Message-----
str_Destination_FileName = Application.getSaveAsFileName

(fileFilter:="Excel Files (*.xls), *.xls")

newWorkbook.SaveAs Filename:=str_Destination_FileName

I hope this would help you.



"Greg Hadrych" wrote:

I am working with the code "SaveCopyAs" and have run in

to
a wall. What I want is when I click on a button in my
document; I want excel to ask if the user wants to save
the document and if so, save it as a user defined name

and
location. I know I could set the original as read-only
but I do not want to do that.

Private Sub Save_As_Click()

Workbooks("Master Template v2.1.XLS").SaveCopyAs

End Sub

This is the code I have so far but do not know what to
place after "SaveCopyAs"

.

  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 107
Default SaveCopyAs

Here's one example:

Sub SaveCopyAsToSameDirectory()
Dim lStr_TargetFile As String

With ThisWorkbook
.SaveCopyAs ThisWorkbook.Path & "\" & _
Left(ThisWorkbook.Name, InStr(1, LCase(ThisWorkbook.Name), ".xls") -
1) & _
" - " & Format(Now, "yyyymmdd hhmmss") & ".xls"
.Save
End With

End Sub

There are more at: http://www.bygsoftware.com/Excel/VBA/saving.htm

--
Regards
Andy Wiggins
www.BygSoftware.com
Home of "Save and BackUp",
"The Excel Auditor" and "Byg Tools for VBA"



"Greg Hadrych" wrote in message
...
I am working with the code "SaveCopyAs" and have run in to
a wall. What I want is when I click on a button in my
document; I want excel to ask if the user wants to save
the document and if so, save it as a user defined name and
location. I know I could set the original as read-only
but I do not want to do that.

Private Sub Save_As_Click()

Workbooks("Master Template v2.1.XLS").SaveCopyAs

End Sub

This is the code I have so far but do not know what to
place after "SaveCopyAs"



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
SaveCopyAs with a twist Rookie 1st class Excel Discussion (Misc queries) 5 January 21st 07 12:33 AM
SaveCopyAs does not work Hank[_4_] Excel Programming 3 April 2nd 04 07:24 AM
SaveCopyAs does not work NickHK[_2_] Excel Programming 0 April 1st 04 02:45 AM
SaveCopyAs method Lee Excel Programming 4 February 16th 04 04:41 PM
SaveCopyAs Mark Worthington Excel Programming 4 February 8th 04 06:00 AM


All times are GMT +1. The time now is 05:40 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"