Thursday, December 17, 2020

SAVE WORKSHEET AS PDF & COPY WORKBOOK TO NEW WORKBOOK VBA

 SAVE WORKSHEET AS PDF

Sub SaveWorkshetAsPDF()

Dimws As Worksheet

For Each ws In Worksheets

ws.ExportAsFixedFormat _

xlTypePDF, _

"ENTER-FOLDER-NAME-HERE" & _

ws.Name & ".pdf"

Next ws

End Sub

COPY WORKBOOK TO NEW WORKBOOK

Sub CopyWorksheetToNewWorkbook()

ThisWorkbook.ActiveSheet.Copy _

Before:=Workbooks.Add.Worksheets(1)

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