Save As window with vba

  • Thread starter Thread starter VBA beginner
  • Start date Start date
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.
 
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:
 
You can

ChDrive c:\dir"
ChDir c:\dir"
ActiveWorkbook.SaveAs Filename:="some other name.xls"
 
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
 
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.
 

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

Back
Top