VBA Excel to PDF -Only parts

I have got an excel sheet that is used to make invoices. Now, I want to export this as PDF and send it on outlook. I managed to create a code that works. The only part which I am not sure about is that there are some parts of the excel sheet that I don’t want to be saved into the PDF. I was wondering if anyone knows a way to do that? I guess it would have to do with changing the part of the code which I am attaching, but I’m not sure what.

Also, I tried just entering Range() after ActiveSheet and then manually input what I DO want. This worked but when saved as PDF, each range is in its own page

Thanks

    Create the PDF
ActiveSheet.ExportAsFixedFormat Type:=xlTypePDF, Filename:=PDFFile, 
Quality:=xlQualityStandard, IncludeDocProperties:=True, IgnorePrintAreas _
:=False, OpenAfterPublish:=OpenPDFAfterCreating
Participant Asked 43 mins ago in VBA: Macros.
Add Comment
0 Answer(s)
  • Found this useful?

    Please share using the share button above.

    If you found the answer is best answer for your question, Please mark as 'best answer' by clicking on the right tick mark icon at the left side of the answer.

    Found the answer useful and wants to credit the user, then vote the answer (vote up).

  • Your Answer

    By posting your answer, you agree to the privacy policy and terms of service.