+ Reply to Thread
Results 1 to 3 of 3

Print via Combo Box Dropdown List

Hybrid View

  1. #1
    Registered User
    Join Date
    11-24-2015
    Location
    Cleveland, Ohio
    MS-Off Ver
    2016
    Posts
    28

    Print via Combo Box Dropdown List

    I have the following code for printing but need to change the "input" to depend on a combo box instead. I have the combo box built with a named range as the row source but am unsure how to link that combo box dropdown selection to fill in for the autofilter so that it prints the desired manager's employee information. I haven't been able to find a similar situation with a combo box being linked to a print action. Please let me know if this does not make sense and I'll try and explain it another way! Thank you!

    Sub Dept_BGT_Print()
    Dim Sel_Manager As String
    'Specify headers to be repeated at the top
    With ActiveSheet.PageSetup
            .PrintTitleRows = "$5:$9"
            .PrintTitleColumns = "$B:$M"
    End With
    
    'Manager selection through simple Inputbox
     Sel_Manager = InputBox("Which manager?")
    'Insert autofilter for worksheet
    Cells.Select
    Selection.AutoFilter
    'Select manager defined in inputbox
    ActiveSheet.Range("B14", Range("M14").End(xlDown)).AutoFilter Field:=1, Criteria1:=Sel_Manager
     'Select range to be printed and specify manager in filename
    ActiveSheet.Range("B14", Range("M14").End(xlDown)).Select
    
    Selection.ExportAsFixedFormat Type:=xlTypePDF, Filename:= _
    "Employee Information.pdf", Quality:=xlQualityStandard, _
    IncludeDocProperties:=True, IgnorePrintAreas:=False, OpenAfterPublish:=True
    
     'remove autofilter
      ActiveSheet.ShowAllData
    End Sub

  2. #2
    Registered User
    Join Date
    11-24-2015
    Location
    Cleveland, Ohio
    MS-Off Ver
    2016
    Posts
    28

    Re: Print via Combo Box Dropdown List

    Issue solved

  3. #3
    Forum Expert Logit's Avatar
    Join Date
    12-23-2012
    Location
    North Carolina
    MS-Off Ver
    Excel 2019 Professional Plus - 2007 Enterprise
    Posts
    7,016

    Re: Print via Combo Box Dropdown List

    How was the problem corrected ? So all of us can share in the solution.

    Thanks !

+ 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. Unsolicited dropdown list from combo box
    By MattRNR in forum Excel General
    Replies: 0
    Last Post: 10-30-2015, 05:28 AM
  2. [SOLVED] Combo DropDown List is moving after text selection
    By suchetherrah in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 09-20-2015, 09:38 PM
  3. how to add a Dropdown list in combo box (Active x control)
    By kasun in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 12-16-2014, 04:47 AM
  4. Print all options from dropdown list to PDF and name the files the exact names in the list
    By johnwilliamboyle in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 10-17-2014, 11:49 AM
  5. Replies: 0
    Last Post: 08-22-2012, 03:52 PM
  6. [SOLVED] combo box dropdown list
    By pczmut in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 06-29-2006, 10:15 AM
  7. [SOLVED] Combo Box List Dropdown
    By HornJM in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 05-15-2006, 05:15 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