Dim fullnme
Dim Cust
Dim Invce
'Assumes Customer Name is in A4
'Invoice Number is in D10
' save this workbook with it's original name to the default path
ThisWorkbook.Save
' Will save as a different workbook, change the name of active workbook to
' the values of A4 & D10
',,,,,,,,True adds to MRU
Cust = Sheets("sheet1").Range("A4")
Invce = Sheets("sheet1").Range("D10")
fullnme = Cust & Invce
ThisWorkbook.SaveAs fullnme, , , , , , , , True
' OR to save a copy and keep the open workbook as same name
Cust = Sheets("sheet1").Range("A4")
Invce = Sheets("sheet1").Range("D10")
fullnme = Cust & Invce
ThisWorkbook.SaveCopyAs fullnme
'close workbook with no further notifications
Application.DisplayAlerts = False
ActiveWorkbook.Close SaveChanges:=False
Application.DisplayAlerts = True
' to add a path & name from ranges
wkbkpath = Sheets("sheet1").Range("A1")
If wkbkpath = "" Then wkbkpath = Application.DefaultFilePath
If Right(wkbkpath, 1) = "\" Then wkbkpath = Left(wkbkpath, (Len(wkbkpath) - 1))
savename = Sheets("sheet1").Range("A2").Value
fullnme = wkbkpath & "\" & savename
ThisWorkbook.SaveAs fullnme, , , , , , , , True
MsgBox "File saved as:" & Chr(10) & Chr(10) & fullnme, vbExclamation, "STATUS"