R
Ronio
I have a Template (xlt) that when the user clicks the save button (on the
excel menu bar), i'm running the following code so that it will save the new
filename in a specific desired format.
Private Sub Workbook_BeforeSave(ByVal SaveAsUI As Boolean, Cancel As Boolean)
Dim fname, pname
fname = Range("SiteCity")
fname = "Charter - " & fname
Application.GetSaveAsFilename (fname)
End Sub
However it is actually saving the file twice, once from my code, then
normally from Excel as when this sub ends it follows the normal save routine
(since the user clicked the save button).
Q1: Is there any way to stop the second routine from saving the file?
Q2: Is there a way to ensure the recommend path is also set the "My
Documents"?
thx,
Ron
excel menu bar), i'm running the following code so that it will save the new
filename in a specific desired format.
Private Sub Workbook_BeforeSave(ByVal SaveAsUI As Boolean, Cancel As Boolean)
Dim fname, pname
fname = Range("SiteCity")
fname = "Charter - " & fname
Application.GetSaveAsFilename (fname)
End Sub
However it is actually saving the file twice, once from my code, then
normally from Excel as when this sub ends it follows the normal save routine
(since the user clicked the save button).
Q1: Is there any way to stop the second routine from saving the file?
Q2: Is there a way to ensure the recommend path is also set the "My
Documents"?
thx,
Ron