Sunday, January 17, 2021

Automatic save file any location by vba

 Sub SaveInvoiceWithNewName()

    Dim NewFN As Variant
    ' Copy Invoice to a New Workbook
    ActiveSheet.Copy
    NewFN = "FILEPATH\" & Range("i5").Value & ".xlsx"
    ActiveWorkbook.SaveAs NewFN, FileFormat:=xlOpenXMLWorkbook
    ActiveWorkbook.Close
    NextInvoice
End Sub

No comments:

Post a Comment

THANKS FOR YOUR SUPPORT

Data copy paste on two another sheet with add row in google sheet by script

 function copyDataWithinWorkbook() {   var sourceSheetName = "Dashbord"; // Replace with the name of the source sheet   var target...