Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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 |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
SaveCopyAs with a twist | Excel Discussion (Misc queries) | |||
SaveCopyAs does not work | Excel Programming | |||
SaveCopyAs does not work | Excel Programming | |||
SaveCopyAs method | Excel Programming | |||
SaveCopyAs | Excel Programming |