keep getting error code in macro, on line copy invoice to new workbook
sorry new to this ,any help appreciated
Sub saveinvwithnewname()Dim Newfn As Variant
copy invoice to a new workbook
Active Worksheet.Copy
Newfn = "c:/users/steves desktop/inv" & Range("b7").Value & ".xlsx"
Activeworbook.saveas Newfn, Fileformat = xmlopenworkbook
Active Workbook.Close
nextinvoice
End Sub