a problem with savaas method

I

iris

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
 
J

Joel

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top