Saturday, February 6, 2021

Automatic bill save any location serieal wise

 Sub SaveInvoiceWithNewName()

    Dim NewFN As Variant

    ' Copy Invoice to a New Workbook

    ActiveSheet.Copy

    NewFN = "C:\\" & Range("i5").Value & ".xlsx"

    ActiveWorkbook.SaveAs NewFN, FileFormat:=xlOpenXMLWorkbook

    ActiveWorkbook.Close

    NextInvoice

End Sub


Sub NextInvoice()

Range("i5").Value = Range("i5").Value + 1

Range("c5:g5").ClearContents

Range("b10:b20").ClearContents

Range("e10:e20").ClearContents

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...