Results 1 to 8 of 8

Macro that will loop through a filtered list and print each selection

Threaded View

  1. #1
    Registered User
    Join Date
    06-23-2014
    Location
    Grand Junction, CO
    MS-Off Ver
    2010
    Posts
    4

    Macro that will loop through a filtered list and print each selection

    I have a spreadshee that is always filtered in cell A9. I would like to create a macro to loop through each selection criteria and print. I have been able to create the initial macro but I need to be able to copy the macro to different worksheets/workbooks in the future and have it work. What is happening now is that I copy it and the pages that print are blank because it's looking for the selection criteria from the original sheet (the selection criteria will change from sheet to sheet but the filtered cell will always be A9). Any help would be greatly appreciated. Here is what I have:

    Sub Printing()
    '
    ' Printing Macro
    '
    
    '
        ActiveSheet.Range("$A$9:$J$62").AutoFilter Field:=1, Criteria1:= _
            "123456 ACT LLC"
        ActiveWindow.SelectedSheets.PrintOut Copies:=1
        ActiveSheet.Range("$A$9:$J$62").AutoFilter Field:=1, Criteria1:= _
            "234567 Alberto's Trucking"
        ActiveWindow.SelectedSheets.PrintOut Copies:=1
        ActiveSheet.Range("$A$9:$J$62").AutoFilter Field:=1, Criteria1:= _
            "345678 AV Trucking"
        ActiveWindow.SelectedSheets.PrintOut Copies:=1
        ActiveSheet.Range("$A$9:$J$62").AutoFilter Field:=1
    End Sub
    Last edited by bobbysue25; 06-24-2014 at 10:42 AM.

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Selection.Filldown doesn't work in a filtered list
    By lordterrin in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 11-20-2013, 02:39 PM
  2. How to print each filtered list on new page?
    By doubl3d80 in forum Excel General
    Replies: 0
    Last Post: 05-08-2013, 11:38 AM
  3. Automative Macro Print All Records in a Filtered List
    By kthumm11 in forum Excel Charting & Pivots
    Replies: 1
    Last Post: 10-16-2012, 11:55 AM
  4. Loop through a Filtered List
    By EggHead in forum Excel Programming / VBA / Macros
    Replies: 15
    Last Post: 10-24-2011, 03:10 PM
  5. Creating a filtered validation list based on selection of another
    By dgtwitch in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 12-21-2010, 09:20 PM

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