I am trying to save a file using an incremental numbering system. I think the problem is that I am trying to save a file name (text?) by adding a numerical value - hence the mismatch.
I don't know how to 'match' the two.
Here's my code:
Your assistance would be greatly appreciated as always.
I don't know how to 'match' the two.
Here's my code:
Code:
Sub Savewithnewname()
Dim NewFN As Variant
PosttoRegister
ActiveSheet.Copy
NewFN = "c:\users\testing\desktop\jest4kix\PO" & Range("f4").Value + ".xlsm"
ActiveWorkbook.SaveAs NewFN, FileFormat:=xlOpenXMLWorkbook
ActiveWorkbook.Close
NextInvoice
End Sub
Your assistance would be greatly appreciated as always.
Last edited by a moderator: