VIX
New Member
We are using the following code for printing excel file into pdf
problem with the code is
1. We have to select cancel button 36 times (no of pages in the sheet) to end the macro I tried getsavesdialog code but it leads to saving the excel file again
2. We want the macro to select file name automatically from specified range
We cannot use export as pdf option since we want print various pages in the single worksheet to multiple pdf
please help on this
Code:
Sub Printing()
Dim pages As Integer
pages = 1
Do
Worksheets("Sal Slip - PM").Activate
Worksheets("Sal Slip - PM").PrintOut From:=pages, To:=pages
pages = pages + 1
Loop Until pages > Cells(3, 2)
End Sub
problem with the code is
1. We have to select cancel button 36 times (no of pages in the sheet) to end the macro I tried getsavesdialog code but it leads to saving the excel file again
2. We want the macro to select file name automatically from specified range
We cannot use export as pdf option since we want print various pages in the single worksheet to multiple pdf
please help on this
Last edited by a moderator: