Hello my name is Roger.
I wanna create multiple PDF files with cell value as file name.
i found this code in internet
with that code, I can only save one data that appears on the sheet card.
Can anyone help me to Save all data as PDF in Score sheet in the form of Card Sheet just one click?? so i can have multiple PDF files
I wanna create multiple PDF files with cell value as file name.
i found this code in internet
Code:
Sub Rectangle1_Click()
On Error Resume Next
MkDir ThisWorkbook.Path & "\SAVE AS PDF\"
On Error GoTo 0
Filename = Sheets("Card").Range("B1") & "-" & Sheets("Card").Range("B2")
If Sheets("Card").Range("B1") = "" Then
MsgBox "Invalid", vbCritical, "Failed to Save"
Exit Sub
Else
With ThisWorkbook.ActiveSheet
fName = Filename
End With
'
'export to pdf
ActiveSheet.ExportAsFixedFormat Type:=xlTypePDF, Filename:= _
ThisWorkbook.Path & "\SAVE AS PDF\" & fName, Quality:=xlQualityStandard, _
IncludeDocProperties:=True, IgnorePrintAreas:=False, OpenAfterPublish:=False
MsgBox "File " & Filename & ".pdf successfull save as PDF", vbInformation, "Convert To PDF"
End If
End Sub
with that code, I can only save one data that appears on the sheet card.
Can anyone help me to Save all data as PDF in Score sheet in the form of Card Sheet just one click?? so i can have multiple PDF files