Click here to Skip to main content
15,889,595 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
I am trying to save my billing in a separate workbook. It should be saving and before clearing to post the information on my register.

VB
Sub SaveStatementWithNewName()
    Dim NewFN As Variant
   'Copy Invoice to a new workbook
    ActiveSheet.Copy
    NewFN = "C:\Users\iaquino\Documents\Billing Statements& Range("F4").Value & ".xlsx";
    ActiveWorkbook.SaveAs NewFN, FileFormat:=xlOpenXMLWorkbook
    ActiveWorkbook.Close
    NextBillingStatement
End Sub
Posted
Updated 11-Dec-15 13:47pm
v2
Comments
PIEBALDconsult 11-Dec-15 19:48pm    
Check your QUOTEs; they don't match. The syntax highlighting should make that obvious.
And it would help if you'd tell us what problem you are having is. Please use Improve question to add detail and context.

1 solution

It should probably read (one line):

NewFN = "C:\Users\iaquino\Documents\Billing Statement " & Range("F4").Value & ".xlsx"
 
Share this answer
 
v3

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900