+ Reply to Thread
Results 1 to 3 of 3

Multiple sheets select based on values in sheets, save to pdf, code update

  1. #1
    Registered User
    Join Date
    07-10-2015
    Location
    CZECH
    MS-Off Ver
    Office 365
    Posts
    53

    Multiple sheets select based on values in sheets, save to pdf, code update

    Dear experts,
    every day I save pdf containing "workbook sheets printing area" without checking, if something relevant is filled in or not in some sheets.
    Could you please help me to update code below, what will select only Sheets, where somethnig is filled in specific range of every Sheet – for example “A1”. Value in every sheet?
    Thank you.



    Private Sub Workbook_BeforeClose(Cancel As Boolean)
    Sheets(Array("AA", "BB", "CC", "DD", "EE", "FF", "GG", "HH", "II", "JJ", "KK")).Select
    Sheets("USA 1").Activate
    ActiveSheet.ExportAsFixedFormat Type:=xlTypePDF, Filename:= _
    "D:\HISTORY\" & Range("C57").Value & " " & Range("E57").Value & ".pdf", _
    Quality:=xlQualityStandard, IncludeDocProperties:=True, IgnorePrintAreas _
    :=False, OpenAfterPublish:=False
    End Sub

  2. #2
    Forum Expert
    Join Date
    05-30-2012
    Location
    The Netherlands
    MS-Off Ver
    Office 365
    Posts
    14,987

    Re: Multiple sheets select based on values in sheets, save to pdf, code update

    I can't help you with your problem, but please add tags # around the code according to the forumrules.
    Notice my main language is not English.

    I appreciate it, if you reply on my solution.

    If you are satisfied with the solution, please mark the question solved.

    You can add reputation by clicking on the star * add reputation.

  3. #3
    Registered User
    Join Date
    07-10-2015
    Location
    CZECH
    MS-Off Ver
    Office 365
    Posts
    53

    Re: Multiple sheets select based on values in sheets, save to pdf, code update

    Hello,

    sorry - I see blank page in case of edit my first post, not able to change.
    I will use code below to modify my code, problem solved.
    vendam



    Please Login or Register  to view this content.
    Last edited by vendam; 06-05-2020 at 11:41 AM.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. [SOLVED] Save multiple sheets as one workbook, filename based on 2 cell values with current path
    By Webbers in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 04-19-2019, 10:26 AM
  2. Select Data from Multiple Sheets, Save on one - Remove Duplicates
    By snuffnchess in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 03-02-2018, 11:35 AM
  3. [SOLVED] code to update table range of sheets in another wb based on count from current wb
    By oliverpa in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 11-27-2017, 03:24 AM
  4. [SOLVED] Select multiple sheets and ranges to run code
    By Groovicles in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 09-14-2016, 09:56 AM
  5. Select Multiple Sheets Based on Cell Values VBA
    By ZachA3 in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 01-21-2014, 04:32 PM
  6. Macro or VBA code to update non primary sheets based on checkbox
    By jbpar5s in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 04-02-2013, 06:19 PM
  7. Select Multiple Sheets In A Vb Code
    By Deci in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 12-15-2008, 11:21 AM

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