ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   SaveAs with a twist (https://www.excelbanter.com/excel-programming/329980-saveas-twist.html)

[email protected]

SaveAs with a twist
 
Hi All,

My code gets the save as filename, but now the client wants to add a
bit of text in the filename. So I've made the code stop before the
actual save with the filename showing and I can update the filename,
but when it saves the filename doesn't update. Here is the code. Any
ideas on what I need to do to fix it? I think I have to chenge the
savename somehow.

savename = qrPath & ActiveCell.Value & " - " &
ActiveCell.Offset(-3, 2).Value & " Quote.xls"
With Application.FileDialog(msoFileDialogSaveAs)
.InitialFileName = savename
.Show
End With

ActiveWorkbook.SaveAs filename:= _
savename, _
FileFormat:=xlNormal, Password:="", WriteResPassword:="", _
ReadOnlyRecommended:=False, CreateBackup:=False

I'd really appreciate some advice.

Thanks,

Michele


Dave Peterson[_5_]

SaveAs with a twist
 
You have one response at your other post.

wrote:

Hi All,

My code gets the save as filename, but now the client wants to add a
bit of text in the filename. So I've made the code stop before the
actual save with the filename showing and I can update the filename,
but when it saves the filename doesn't update. Here is the code. Any
ideas on what I need to do to fix it? I think I have to chenge the
savename somehow.

savename = qrPath & ActiveCell.Value & " - " &
ActiveCell.Offset(-3, 2).Value & " Quote.xls"
With Application.FileDialog(msoFileDialogSaveAs)
.InitialFileName = savename
.Show
End With

ActiveWorkbook.SaveAs filename:= _
savename, _
FileFormat:=xlNormal, Password:="", WriteResPassword:="", _
ReadOnlyRecommended:=False, CreateBackup:=False

I'd really appreciate some advice.

Thanks,

Michele


--

Dave Peterson


All times are GMT +1. The time now is 11:01 AM.

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