Allowing user to choose to accept saveas option
Thanks for your help guys. I've managed to get a solution which, for the
benefit of others, looks like this:
Sub save_it()
Dim fname
With ActiveWorkbook
Application.Dialogs(xlDialogSaveAs).Show "ABCD_" &
Format(.Worksheets("Remediation Plan").Range("F2").Value, "yymmdd-hhmm") &
"_" & .Worksheets("Remediation Plan").Range("C2").Value & ".xls"
End With
End Sub
I've picked the date value as yymmdd-hhmm as it's probably easiest for
filing.
Cell F2 is the date (evidently)
Cell C2 is the company name of the user that's completing the form.
No doubt I'll be back for other stuff.
Tel
"Tel" wrote:
I've managed to create the "saveas Macro using cell contents".
However, it automatically saves it to my documents.
Here's my code
Sub save_it()
Dim fname
With ActiveWorkbook
fname = "VMRP_" & .Worksheets("TEST").Range("A1").Value & "_" &
.Worksheets("sheet2").Range("B3").Value & ".xls"
.SaveAs fname
End With
End Sub
Is it possible to insert a break which brings up the saveas dialog box and
enables the user to change the filename (possibly to match their naming
protocols and conventions and pick the location where they would store it?
Many thanks
Terry
|