watabowtbob
New Member
- Joined
- Sep 8, 2016
- Messages
- 2
I have this working Macro but instead of saving to a specific directory I want it to save to the same directory as the current file.
What can I plug in there that won't change the other functions
What can I plug in there that won't change the other functions
Code:
Sub saveinvwithnewname()
Dim newfn As Variant
' copy invoice to new workbook
ActiveSheet.Copy
newfn = "C:\Users\Bob\Google Drive\TAMBE\E_INVOICES\Bob\E_" & Range("k4").Value & ".xlsx"
ActiveWorkbook.SaveAs newfn, FileFormat:=xlOpenXMLWorkbook
ActiveWorkbook.Close
Increment_invoice
ThisWorkbook.Save 'Saves the workbook the macro is in.
End Sub
Last edited by a moderator: