Hi trying to run this code and I get the error message 1004
Can anyone tell me what I am doing wrong?
![]()
Sub SaveInvWithNewName() Dim NewFN As Variant Dim sfile As String ' Copy Invoice to a new workbook ActiveSheet.Copy NewFN = "C:\Documents and Settings\Owner\My Documents\Accounts" & Range("I1").Value & ".xls" ActiveWorkbook.SaveAs NewFN, FileFormat:=xlExcel8 ActiveWorkbook.Close End Sub
Bookmarks