ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   a problem with savaas method (https://www.excelbanter.com/excel-programming/419806-problem-savaas-method.html)

iris

a problem with savaas method
 
I need to create an ecxel template and allow my endusers to open it from an
intranet site and save a copy of that template as an excell document that
enabels macros.

in that template I put a picture. when the user clicks the picture the
saveas screen prompts and the user can save the document to his own computer
with another name with the picture and the macros.

I have recorded the macro:


ActiveWorkbook.SaveAs Filename:= _
"C:\Documents and Settings\yosi\My Documents\123.xls",
FileFormat:=xlNormal _
, Password:="", WriteResPassword:="", ReadOnlyRecommended:=False

but, instead of saving the document like the macro shows, I want it to
prompt the "get saveas" screen and allow the user to save the document to the
library of his choice with a different name.

I hope this is clear enough... and someone can help me... because I am stuck
with this problem for over a week now....

thanks,

Iris



joel

a problem with savaas method
 
fileSaveName = Application.GetSaveAsFilename( _
fileFilter:="Excel Files (*.xls), *.xls")
If fileSaveName = False Then
MsgBox ("Cannot Save file, Exiting Sub")
Exit Sub
End If

ActiveWorkbook.SaveAs _
Filename:=fileSaveName, _
FileFormat:=xlNormal, _
Password:="", _
WriteResPassword:="", _
ReadOnlyRecommended:=False


"iris" wrote:

I need to create an ecxel template and allow my endusers to open it from an
intranet site and save a copy of that template as an excell document that
enabels macros.

in that template I put a picture. when the user clicks the picture the
saveas screen prompts and the user can save the document to his own computer
with another name with the picture and the macros.

I have recorded the macro:


ActiveWorkbook.SaveAs Filename:= _
"C:\Documents and Settings\yosi\My Documents\123.xls",
FileFormat:=xlNormal _
, Password:="", WriteResPassword:="", ReadOnlyRecommended:=False

but, instead of saving the document like the macro shows, I want it to
prompt the "get saveas" screen and allow the user to save the document to the
library of his choice with a different name.

I hope this is clear enough... and someone can help me... because I am stuck
with this problem for over a week now....

thanks,

Iris



iris

a problem with savaas method
 
Hi Joel!

Thank You very much for your help!!

It works like a charm!

"Joel" wrote:

fileSaveName = Application.GetSaveAsFilename( _
fileFilter:="Excel Files (*.xls), *.xls")
If fileSaveName = False Then
MsgBox ("Cannot Save file, Exiting Sub")
Exit Sub
End If

ActiveWorkbook.SaveAs _
Filename:=fileSaveName, _
FileFormat:=xlNormal, _
Password:="", _
WriteResPassword:="", _
ReadOnlyRecommended:=False


"iris" wrote:

I need to create an ecxel template and allow my endusers to open it from an
intranet site and save a copy of that template as an excell document that
enabels macros.

in that template I put a picture. when the user clicks the picture the
saveas screen prompts and the user can save the document to his own computer
with another name with the picture and the macros.

I have recorded the macro:


ActiveWorkbook.SaveAs Filename:= _
"C:\Documents and Settings\yosi\My Documents\123.xls",
FileFormat:=xlNormal _
, Password:="", WriteResPassword:="", ReadOnlyRecommended:=False

but, instead of saving the document like the macro shows, I want it to
prompt the "get saveas" screen and allow the user to save the document to the
library of his choice with a different name.

I hope this is clear enough... and someone can help me... because I am stuck
with this problem for over a week now....

thanks,

Iris




All times are GMT +1. The time now is 12:21 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com