mtagliaferri
Board Regular
- Joined
- Oct 27, 2004
- Messages
- 156
Hi Have a code to create a pdf file and open it afterwards, this works perfect, however I have added a second sheet which I want to save and open this sheet too (Company Property Checklist), but since adding this I have an error
Any thoughts on hoe to save both sheets separately and open them also?
VBA Code:
Sub CreatePDF()
ShLeaversForm.ExportAsFixedFormat xlTypePDF, Environ("Userprofile") & "\Documents\" & Range("D12") & " " & Range("D13") & " " & _
Format(Range("E19"), "YYYYDDMM") & " " & ShLeaversForm.Name & ".pdf", OpenAfterPublish:=True
ShCompanyPropertyChecklist.ExportAsFixedFormat xlTypePDF, Environ("Userprofile") & "\Documents\" & Range("D12") & " " & Range("D13") & " " & _
Format(Range("E19"), "YYYYDDMM") & " " & ShLeaversForm.Name & ".pdf", OpenAfterPublish:=True
End Sub
Any thoughts on hoe to save both sheets separately and open them also?