SaveAs

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have the following and would like the sheet to be saved by combining two
cell values in the active sheet.

Can anyone Help?

Many thanks
Dunc

Sub PrintandSave()

ActiveWindow.SelectedSheets.PrintOut Copies:=1, Collate:=True
MsgBox "Your document has been printed. Click OK To Copy Memo to A New
Sheet, You can then save the Memo From Here", vbInformation, "HEAD OFFICE -
Payroll Documents"
Range("B2:M34").Select
Selection.Copy
Workbooks.Add
ActiveSheet.Paste
Range("A1").Select
ActiveSheet.SaveAs Filename:="U:\"cell e10" & "cell e12".xls
 
hi Duncan,
In the last line, your quotes are a bit mixed up... I would also name
the two elements before using them...

it should read something like...
first = Range("E10")
second = Range("E12")
ActiveSheet.SaveAs Filename:="U:\" & first & second & ".xls"

Try that...

Regards,

Gareth,
 

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