Save As window with vba

V

VBA beginner

Is it possible to use existing Save As function with Vba? What kind of
commands I have to use to open File-->Save As window using vba?

My target is to force user to save the document with different name than
original every time when the user opens the original version of the dokument.
 
V

VBA beginner

Okey, it works, but this way isn't possible to let user to choose directory
where the file will be saved. Whole path is possible to save to the variable
and use it, but it isn't wice, for example if the user doesn't know the
directory tree exactly.

"Bob Phillips" kirjoitti:
 
B

Bob Phillips

You can

ChDrive c:\dir"
ChDir c:\dir"
ActiveWorkbook.SaveAs Filename:="some other name.xls"
 
A

Andy Pope

Hi,

Have a look at using

application.GetSaveAsFilename

which, displays the standard Save As dialog box and gets a file name from
the user without actually saving any files.

Cheers
Andy
 
S

scooper

Use Bob's solution and create a userform in VBA with a textbox for the user
to enter the new filename and add an incrementing counter to it plus a "_"
and the date.Add a button to Userform1.Hide and you've got it.
scooper

VBA beginner said:
Is it possible to use existing Save As function with Vba? What kind of
commands I have to use to open File-->Save As window using vba?

My target is to force user to save the document with different name than
original every time when the user opens the original version of the
dokument.
 
Top