Results 1 to 8 of 8

Blank Pages Saved As PDF

Threaded View

  1. #1
    Registered User
    Join Date
    07-25-2019
    Location
    San Diego, CA
    MS-Off Ver
    16.0.11727.20222
    Posts
    34

    Blank Pages Saved As PDF

    Hey all!

    I've written a code to save a couple of selected pages as PDFs. My code works, saving it in the correct file path with the correct names and all. The problem is, the saved PDF has a third, blank page, when there should only be two. The selected ranges on both sheets go up to 46, and both are on one page, so I know it's not that.

    Private Sub ConsentPDF_Click()
    Dim Path As String
    Dim FileName1 As String
    Dim FileName2 As String
    Dim FileName3 As String
    Path = "O:\LAB\Label Tracking\Mailed Forms\"
    FileName1 = "Use & Destruction Consent"
    FileName2 = Sheets("Use Consent").Range("B2")
    FileName3 = Sheets("Use Consent").Range("F2")
    
    Sheets("Use Consent").Activate
    ActiveSheet.UsedRange.Select
    Sheets("Destruction Consent").Select
    ActiveSheet.UsedRange.Select
    
    ThisWorkbook.Sheets(Array("Use Consent", "Destruction Consent")).Select
    Selection.ExportAsFixedFormat Type:=xlTypePDF, Filename:=Path & FileName1 & " - " & FileName2 & " - " & FileName3 _
        , Quality:=xlQualityStandard, IncludeDocProperties:=True, IgnorePrintAreas:=False, OpenAfterPublish:=False
    End Sub
    Thank you for any help!
    Attached Files Attached Files
    Last edited by hindotmo12; 08-26-2019 at 11:56 AM.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Copy Data from Saved Multiple Web Pages to MS-Excel sheet wise
    By srikanthk in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 09-18-2015, 01:38 AM
  2. VBA to open saved web html pages - extract text - paste text within individual cell
    By EddieRubi in forum Excel Programming / VBA / Macros
    Replies: 17
    Last Post: 07-23-2015, 01:43 PM
  3. Replies: 1
    Last Post: 09-12-2012, 06:29 PM
  4. blank pages
    By jemma in forum Excel General
    Replies: 1
    Last Post: 10-24-2006, 07:32 PM
  5. How do I get rid of all of the blank pages?
    By stkelly52 in forum Excel General
    Replies: 5
    Last Post: 04-15-2006, 08:20 AM
  6. [SOLVED] how do I add blank pages to
    By rozan in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 03-01-2006, 04:50 PM
  7. [SOLVED] Blank Worksheet Pages
    By EricRod in forum Excel - New Users/Basics
    Replies: 2
    Last Post: 07-26-2005, 06:05 PM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1