• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

VBA to save page as .pdf, name to come from cell values

Please Help, i am new here... currently code below worked perfectly, but i want to control based on cell value which sheets will be converted in pdf.

Example: A1, A2, A3, & A5 VALUE is "1" and A4 VALUE is "0" then convert all sheets to pdf except Sheet4.

'*=*=*==*=**=*=*=*=*=*=
Sub ConvertPdfFile()
ThisWorkbook.Sheets(Array("Sheet1", "Sheet2", "Sheet3", "Sheet4", "Sheet5")).Select

ActiveSheet.ExportAsFixedFormat _
Type:=xlTypePDF, _
Filename:="D:\JUN.pdf", _
Quality:=xlQualityStandard, _
IncludeDocProperties:=True, _
IgnorePrintAreas:=False, _
OpenAfterPublish:=True

End Sub

'*=*=*==*=**=*=*=*=*=*=

please please... thanks....
 
Please Help, i am new here... currently code below worked perfectly, but i want to control based on cell value which sheets will be converted in pdf.

........
'*=*=*==*=**=*=*=*=*=*=

please please... thanks....


It would our pleasure if you take the liberty to start a new post instead of hijacking others post.

Pls follow the forum rules.o_O
 
Back
Top