Results 1 to 2 of 2

Checkboxes not selecting sheets for PDF generation

Threaded View

  1. #2
    Forum Expert
    Join Date
    12-14-2012
    Location
    London England
    MS-Off Ver
    MS 365 Office Suite.
    Posts
    8,448

    Re: Checkboxes not selecting sheets for PDF generation

    Maybe:-

    
    Private Sub chbxEnter_Click()
    
        Dim PDFsheets As String
        Dim s As Worksheet
    
    Mysheets = split("Approval Form,Business Plan,Deal Worksheet,All Manager Deal Recap,Deal Recap,MEC Dealership Profile,Loyal,Mid Loyal,Non Loyal,Projected Incentive Report,MEC",",")
    
     For count = 1 to Ubound(MySheets)
    
    If Activesheet.controls("CheckBox" & Count).Value = True Then PDFsheets = PDFsheets & MyArray(Count) & ","
    Next
    
    PDFsheets = Left(PDFsheets, Len(PDFsheets)-1)
    
    MyArray = Split(PDFsheets,",")
            
        ThisWorkbook.Sheets(MyArray).Select
    
          ActiveSheet.ExportAsFixedFormat Type:=xlTypePDF, Filename:= _
            strPath & strFName, Quality:=xlQualityStandard, _
            IncludeDocProperties:=True, IgnorePrintAreas:=False, OpenAfterPublish:=True
                                    
      ActiveWindow.SelectedSheets(1).Select
    
    
    End Sub
    Last edited by mehmetcik; 08-10-2017 at 06:28 PM.
    My General Rules if you want my help. Not aimed at any person in particular:

    1. Please Make Requests not demands, none of us get paid here.

    2. Check back on your post regularly. I will not return to a post after 4 days.
    If it is not important to you then it definitely is not important to me.

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. [SOLVED] Selecting the row together with the checkboxes contained
    By jj4jj in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 02-27-2016, 06:34 AM
  2. Print Sheets based on checkboxes in UserForm, Checkboxes also control another macro
    By krackaberr in forum Excel Programming / VBA / Macros
    Replies: 34
    Last Post: 03-05-2013, 11:12 AM
  3. Selecting Checkboxes using Drop Down List
    By neerajdwivedi in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 03-02-2013, 06:44 AM
  4. [SOLVED] Selecting rows depending on checkboxes
    By Bishonen in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 10-13-2012, 10:34 AM
  5. Automatically selecting checkboxes
    By shy07014 in forum Access Programming / VBA / Macros
    Replies: 8
    Last Post: 04-20-2010, 10:52 PM
  6. Checkboxes, selecting
    By Rick_Stanich in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 08-15-2009, 10:26 AM
  7. Selecting many Checkboxes to align & size
    By Saz in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 06-07-2006, 12:01 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