![]() |
Save As window with vba
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. |
Save As window with vba
ActiveWorkbook.SaveAs Filename:="c:\dir\some other name.xls"
-- __________________________________ HTH Bob "VBA beginner" wrote in message ... 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. |
Save As window with vba
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: ActiveWorkbook.SaveAs Filename:="c:\dir\some other name.xls" -- __________________________________ HTH Bob "VBA beginner" wrote in message ... 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. |
Save As window with vba
You can
ChDrive c:\dir" ChDir c:\dir" ActiveWorkbook.SaveAs Filename:="some other name.xls" -- __________________________________ HTH Bob "VBA beginner" wrote in message ... 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: ActiveWorkbook.SaveAs Filename:="c:\dir\some other name.xls" -- __________________________________ HTH Bob "VBA beginner" wrote in message ... 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. |
Save As window with vba
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 -- Andy Pope, Microsoft MVP - Excel http://www.andypope.info "VBA beginner" wrote in message ... 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: ActiveWorkbook.SaveAs Filename:="c:\dir\some other name.xls" -- __________________________________ HTH Bob "VBA beginner" wrote in message ... 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. |
Save As window with vba
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" wrote in message ... 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. |
All times are GMT +1. The time now is 06:33 AM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com