WingSystems
New Member
- Joined
- Aug 24, 2016
- Messages
- 15
- Office Version
- 365
- Platform
- Windows
Hi all,
I have a couple newbie questions for a PDF Export Command Button for a workbook.
Right now I have created a section on a sheet with checkboxes (triggering a TRUE/FALSE value on each sheet) for printing/exporting.
-- removed inline image ---
The macro code for the Print work fine, but the PDF Export is where I run into issues.
The issues I am having are below:
Any help at all is appreciated!
-Wing Systems
I have a couple newbie questions for a PDF Export Command Button for a workbook.
Right now I have created a section on a sheet with checkboxes (triggering a TRUE/FALSE value on each sheet) for printing/exporting.
-- removed inline image ---
The macro code for the Print work fine, but the PDF Export is where I run into issues.
Code:
Sub PDFExport()
For Each w In Worksheets
If Sheets(w.Name).Range("bt1") = True Then
Sheets(w.Name).ExportAsFixedFormat Type:=xlTypePDF, Filename:= _
"?????", Quality:=xlQualityStandard, _
IncludeDocProperties:=True, IgnorePrintAreas:=False, OpenAfterPublish:= _
True
End If
Next w
End Sub
The issues I am having are below:
- How could I have a Save Prompt or use something like<code> "</code>ThisWorkbook.Path & Filename"? (trying to eliminate hard coding to location due to multiple users).<code></code>
- Upon testing the PDF Export function only takes the first checked sheet above, how could I change my code to select all checked?
Any help at all is appreciated!
-Wing Systems