+ Reply to Thread
Results 1 to 36 of 36

Create a print macro that would automatically select print area?

  1. #1
    Ron de Bruin
    Guest

    Re: Create a print macro that would automatically select print are

    OK

    Try this for a sheet named "Sheet1"

    Note: I filter on the A column for non zeros so i assume that you don't have zeros in your
    data in column A.(only zeros below your data)

    Delete preview:=True if it is working correct

    Sub Test_With_AutoFilter()
    Dim WS As Worksheet
    Dim rng As Range
    Dim Str As String

    Set WS = Sheets("sheet1") '<<< Change
    'A1 is the top left cell of your filter range and the header of the first column
    Set rng = WS.Range("A1").CurrentRegion '<<< Change
    Str = "<>0" '<<< Change

    'Close AutoFilter first
    WS.AutoFilterMode = False

    'This example filter on the first column in the range (change the field if needed)
    rng.AutoFilter Field:=1, Criteria1:=Str
    WS.PrintOut preview:=True
    WS.AutoFilterMode = False
    End Sub


    --
    Regards Ron de Bruin
    http://www.rondebruin.nl


    "wastedwings" <[email protected]> wrote in message news:[email protected]...
    > The data consists of columns A through E with the header row being on Row 1
    >
    > "Ron de Bruin" wrote:
    >
    >> We can make a filter / print macro
    >> Do you have headers above your data and if you do in which row
    >> Can we check one column in your data table if it contains data <> then 0 (which column)
    >>
    >> I will make a example for you if you give me the information
    >>
    >>
    >> --
    >> Regards Ron de Bruin
    >> http://www.rondebruin.nl
    >>
    >>
    >> "wastedwings" <[email protected]> wrote in message news:[email protected]...
    >> > Ok, I tried that. Now when I check the print preview, it prints like 17 pages
    >> > of empty cells. How can I create a macro to Print using "print if cells
    >> > contain...."?
    >> >
    >> > "Ron de Bruin" wrote:
    >> >
    >> >> >> but contain links to another worksheet for future linking
    >> >>
    >> >> Maybe this is a easy solution for you
    >> >>
    >> >> If you have zero's in the cells then you can use
    >> >> Tools>Options...View
    >> >> Uncheck Zero values
    >> >>
    >> >> --
    >> >> Regards Ron de Bruin
    >> >> http://www.rondebruin.nl
    >> >>
    >> >>
    >> >> "wastedwings" <[email protected]> wrote in message
    >> >> news:[email protected]...
    >> >> >I have a worksheet that contains information that updates from another
    >> >> > worksheet (contains links). I print the worksheet out each time it is
    >> >> > updated, but I would like to create a macro that would automatically select
    >> >> > the print area of the cells that contain information, instead of going in and
    >> >> > selecting the print area. Since there are cells that do not have information,
    >> >> > but contain links to another worksheet for future linking, hitting the print
    >> >> > button will not print the cells that contain information only, but will only
    >> >> > print a portion of the worksheet.
    >> >> >
    >> >> > "Ron de Bruin" wrote:
    >> >> >
    >> >> >> Hi wastedwings
    >> >> >>
    >> >> >> Can you give more information
    >> >> >>
    >> >> >>
    >> >> >> --
    >> >> >> Regards Ron de Bruin
    >> >> >> http://www.rondebruin.nl
    >> >> >>
    >> >> >>
    >> >> >> "wastedwings" <[email protected]> wrote in message
    >> >> >> news:[email protected]...
    >> >> >> > How do I create a macro to automatically select the print area that has
    >> >> >> > contents in certain cells?
    >> >> >>
    >> >> >>
    >> >> >>
    >> >>
    >> >>
    >> >>

    >>
    >>
    >>




  2. #2
    Ron de Bruin
    Guest

    Re: Create a print macro that would automatically select print are

    We can make a filter / print macro
    Do you have headers above your data and if you do in which row
    Can we check one column in your data table if it contains data <> then 0 (which column)

    I will make a example for you if you give me the information


    --
    Regards Ron de Bruin
    http://www.rondebruin.nl


    "wastedwings" <[email protected]> wrote in message news:[email protected]...
    > Ok, I tried that. Now when I check the print preview, it prints like 17 pages
    > of empty cells. How can I create a macro to Print using "print if cells
    > contain...."?
    >
    > "Ron de Bruin" wrote:
    >
    >> >> but contain links to another worksheet for future linking

    >>
    >> Maybe this is a easy solution for you
    >>
    >> If you have zero's in the cells then you can use
    >> Tools>Options...View
    >> Uncheck Zero values
    >>
    >> --
    >> Regards Ron de Bruin
    >> http://www.rondebruin.nl
    >>
    >>
    >> "wastedwings" <[email protected]> wrote in message news:[email protected]...
    >> >I have a worksheet that contains information that updates from another
    >> > worksheet (contains links). I print the worksheet out each time it is
    >> > updated, but I would like to create a macro that would automatically select
    >> > the print area of the cells that contain information, instead of going in and
    >> > selecting the print area. Since there are cells that do not have information,
    >> > but contain links to another worksheet for future linking, hitting the print
    >> > button will not print the cells that contain information only, but will only
    >> > print a portion of the worksheet.
    >> >
    >> > "Ron de Bruin" wrote:
    >> >
    >> >> Hi wastedwings
    >> >>
    >> >> Can you give more information
    >> >>
    >> >>
    >> >> --
    >> >> Regards Ron de Bruin
    >> >> http://www.rondebruin.nl
    >> >>
    >> >>
    >> >> "wastedwings" <[email protected]> wrote in message
    >> >> news:[email protected]...
    >> >> > How do I create a macro to automatically select the print area that has
    >> >> > contents in certain cells?
    >> >>
    >> >>
    >> >>

    >>
    >>
    >>




  3. #3
    wastedwings
    Guest

    Re: Create a print macro that would automatically select print are

    Ok, I tried that. Now when I check the print preview, it prints like 17 pages
    of empty cells. How can I create a macro to Print using "print if cells
    contain...."?

    "Ron de Bruin" wrote:

    > >> but contain links to another worksheet for future linking

    >
    > Maybe this is a easy solution for you
    >
    > If you have zero's in the cells then you can use
    > Tools>Options...View
    > Uncheck Zero values
    >
    > --
    > Regards Ron de Bruin
    > http://www.rondebruin.nl
    >
    >
    > "wastedwings" <[email protected]> wrote in message news:[email protected]...
    > >I have a worksheet that contains information that updates from another
    > > worksheet (contains links). I print the worksheet out each time it is
    > > updated, but I would like to create a macro that would automatically select
    > > the print area of the cells that contain information, instead of going in and
    > > selecting the print area. Since there are cells that do not have information,
    > > but contain links to another worksheet for future linking, hitting the print
    > > button will not print the cells that contain information only, but will only
    > > print a portion of the worksheet.
    > >
    > > "Ron de Bruin" wrote:
    > >
    > >> Hi wastedwings
    > >>
    > >> Can you give more information
    > >>
    > >>
    > >> --
    > >> Regards Ron de Bruin
    > >> http://www.rondebruin.nl
    > >>
    > >>
    > >> "wastedwings" <[email protected]> wrote in message news:[email protected]...
    > >> > How do I create a macro to automatically select the print area that has
    > >> > contents in certain cells?
    > >>
    > >>
    > >>

    >
    >
    >


  4. #4
    Ron de Bruin
    Guest

    Re: Create a print macro that would automatically select print are

    >> but contain links to another worksheet for future linking

    Maybe this is a easy solution for you

    If you have zero's in the cells then you can use
    Tools>Options...View
    Uncheck Zero values

    --
    Regards Ron de Bruin
    http://www.rondebruin.nl


    "wastedwings" <[email protected]> wrote in message news:[email protected]...
    >I have a worksheet that contains information that updates from another
    > worksheet (contains links). I print the worksheet out each time it is
    > updated, but I would like to create a macro that would automatically select
    > the print area of the cells that contain information, instead of going in and
    > selecting the print area. Since there are cells that do not have information,
    > but contain links to another worksheet for future linking, hitting the print
    > button will not print the cells that contain information only, but will only
    > print a portion of the worksheet.
    >
    > "Ron de Bruin" wrote:
    >
    >> Hi wastedwings
    >>
    >> Can you give more information
    >>
    >>
    >> --
    >> Regards Ron de Bruin
    >> http://www.rondebruin.nl
    >>
    >>
    >> "wastedwings" <[email protected]> wrote in message news:[email protected]...
    >> > How do I create a macro to automatically select the print area that has
    >> > contents in certain cells?

    >>
    >>
    >>




  5. #5
    wastedwings
    Guest

    Re: Create a print macro that would automatically select print are

    The data consists of columns A through E with the header row being on Row 1

    "Ron de Bruin" wrote:

    > We can make a filter / print macro
    > Do you have headers above your data and if you do in which row
    > Can we check one column in your data table if it contains data <> then 0 (which column)
    >
    > I will make a example for you if you give me the information
    >
    >
    > --
    > Regards Ron de Bruin
    > http://www.rondebruin.nl
    >
    >
    > "wastedwings" <[email protected]> wrote in message news:[email protected]...
    > > Ok, I tried that. Now when I check the print preview, it prints like 17 pages
    > > of empty cells. How can I create a macro to Print using "print if cells
    > > contain...."?
    > >
    > > "Ron de Bruin" wrote:
    > >
    > >> >> but contain links to another worksheet for future linking
    > >>
    > >> Maybe this is a easy solution for you
    > >>
    > >> If you have zero's in the cells then you can use
    > >> Tools>Options...View
    > >> Uncheck Zero values
    > >>
    > >> --
    > >> Regards Ron de Bruin
    > >> http://www.rondebruin.nl
    > >>
    > >>
    > >> "wastedwings" <[email protected]> wrote in message news:[email protected]...
    > >> >I have a worksheet that contains information that updates from another
    > >> > worksheet (contains links). I print the worksheet out each time it is
    > >> > updated, but I would like to create a macro that would automatically select
    > >> > the print area of the cells that contain information, instead of going in and
    > >> > selecting the print area. Since there are cells that do not have information,
    > >> > but contain links to another worksheet for future linking, hitting the print
    > >> > button will not print the cells that contain information only, but will only
    > >> > print a portion of the worksheet.
    > >> >
    > >> > "Ron de Bruin" wrote:
    > >> >
    > >> >> Hi wastedwings
    > >> >>
    > >> >> Can you give more information
    > >> >>
    > >> >>
    > >> >> --
    > >> >> Regards Ron de Bruin
    > >> >> http://www.rondebruin.nl
    > >> >>
    > >> >>
    > >> >> "wastedwings" <[email protected]> wrote in message
    > >> >> news:[email protected]...
    > >> >> > How do I create a macro to automatically select the print area that has
    > >> >> > contents in certain cells?
    > >> >>
    > >> >>
    > >> >>
    > >>
    > >>
    > >>

    >
    >
    >


  6. #6
    wastedwings
    Guest

    Re: Create a print macro that would automatically select print are

    I have a worksheet that contains information that updates from another
    worksheet (contains links). I print the worksheet out each time it is
    updated, but I would like to create a macro that would automatically select
    the print area of the cells that contain information, instead of going in and
    selecting the print area. Since there are cells that do not have information,
    but contain links to another worksheet for future linking, hitting the print
    button will not print the cells that contain information only, but will only
    print a portion of the worksheet.

    "Ron de Bruin" wrote:

    > Hi wastedwings
    >
    > Can you give more information
    >
    >
    > --
    > Regards Ron de Bruin
    > http://www.rondebruin.nl
    >
    >
    > "wastedwings" <[email protected]> wrote in message news:[email protected]...
    > > How do I create a macro to automatically select the print area that has
    > > contents in certain cells?

    >
    >
    >


  7. #7
    Ron de Bruin
    Guest

    Re: Create a print macro that would automatically select print area?

    Hi wastedwings

    Can you give more information


    --
    Regards Ron de Bruin
    http://www.rondebruin.nl


    "wastedwings" <[email protected]> wrote in message news:[email protected]...
    > How do I create a macro to automatically select the print area that has
    > contents in certain cells?




  8. #8
    Ron de Bruin
    Guest

    Re: Create a print macro that would automatically select print are

    We can make a filter / print macro
    Do you have headers above your data and if you do in which row
    Can we check one column in your data table if it contains data <> then 0 (which column)

    I will make a example for you if you give me the information


    --
    Regards Ron de Bruin
    http://www.rondebruin.nl


    "wastedwings" <[email protected]> wrote in message news:[email protected]...
    > Ok, I tried that. Now when I check the print preview, it prints like 17 pages
    > of empty cells. How can I create a macro to Print using "print if cells
    > contain...."?
    >
    > "Ron de Bruin" wrote:
    >
    >> >> but contain links to another worksheet for future linking

    >>
    >> Maybe this is a easy solution for you
    >>
    >> If you have zero's in the cells then you can use
    >> Tools>Options...View
    >> Uncheck Zero values
    >>
    >> --
    >> Regards Ron de Bruin
    >> http://www.rondebruin.nl
    >>
    >>
    >> "wastedwings" <[email protected]> wrote in message news:[email protected]...
    >> >I have a worksheet that contains information that updates from another
    >> > worksheet (contains links). I print the worksheet out each time it is
    >> > updated, but I would like to create a macro that would automatically select
    >> > the print area of the cells that contain information, instead of going in and
    >> > selecting the print area. Since there are cells that do not have information,
    >> > but contain links to another worksheet for future linking, hitting the print
    >> > button will not print the cells that contain information only, but will only
    >> > print a portion of the worksheet.
    >> >
    >> > "Ron de Bruin" wrote:
    >> >
    >> >> Hi wastedwings
    >> >>
    >> >> Can you give more information
    >> >>
    >> >>
    >> >> --
    >> >> Regards Ron de Bruin
    >> >> http://www.rondebruin.nl
    >> >>
    >> >>
    >> >> "wastedwings" <[email protected]> wrote in message
    >> >> news:[email protected]...
    >> >> > How do I create a macro to automatically select the print area that has
    >> >> > contents in certain cells?
    >> >>
    >> >>
    >> >>

    >>
    >>
    >>




  9. #9
    wastedwings
    Guest

    Re: Create a print macro that would automatically select print are

    I have a worksheet that contains information that updates from another
    worksheet (contains links). I print the worksheet out each time it is
    updated, but I would like to create a macro that would automatically select
    the print area of the cells that contain information, instead of going in and
    selecting the print area. Since there are cells that do not have information,
    but contain links to another worksheet for future linking, hitting the print
    button will not print the cells that contain information only, but will only
    print a portion of the worksheet.

    "Ron de Bruin" wrote:

    > Hi wastedwings
    >
    > Can you give more information
    >
    >
    > --
    > Regards Ron de Bruin
    > http://www.rondebruin.nl
    >
    >
    > "wastedwings" <[email protected]> wrote in message news:[email protected]...
    > > How do I create a macro to automatically select the print area that has
    > > contents in certain cells?

    >
    >
    >


  10. #10
    Ron de Bruin
    Guest

    Re: Create a print macro that would automatically select print are

    >> but contain links to another worksheet for future linking

    Maybe this is a easy solution for you

    If you have zero's in the cells then you can use
    Tools>Options...View
    Uncheck Zero values

    --
    Regards Ron de Bruin
    http://www.rondebruin.nl


    "wastedwings" <[email protected]> wrote in message news:[email protected]...
    >I have a worksheet that contains information that updates from another
    > worksheet (contains links). I print the worksheet out each time it is
    > updated, but I would like to create a macro that would automatically select
    > the print area of the cells that contain information, instead of going in and
    > selecting the print area. Since there are cells that do not have information,
    > but contain links to another worksheet for future linking, hitting the print
    > button will not print the cells that contain information only, but will only
    > print a portion of the worksheet.
    >
    > "Ron de Bruin" wrote:
    >
    >> Hi wastedwings
    >>
    >> Can you give more information
    >>
    >>
    >> --
    >> Regards Ron de Bruin
    >> http://www.rondebruin.nl
    >>
    >>
    >> "wastedwings" <[email protected]> wrote in message news:[email protected]...
    >> > How do I create a macro to automatically select the print area that has
    >> > contents in certain cells?

    >>
    >>
    >>




  11. #11
    Ron de Bruin
    Guest

    Re: Create a print macro that would automatically select print area?

    Hi wastedwings

    Can you give more information


    --
    Regards Ron de Bruin
    http://www.rondebruin.nl


    "wastedwings" <[email protected]> wrote in message news:[email protected]...
    > How do I create a macro to automatically select the print area that has
    > contents in certain cells?




  12. #12
    wastedwings
    Guest

    Re: Create a print macro that would automatically select print are

    The data consists of columns A through E with the header row being on Row 1

    "Ron de Bruin" wrote:

    > We can make a filter / print macro
    > Do you have headers above your data and if you do in which row
    > Can we check one column in your data table if it contains data <> then 0 (which column)
    >
    > I will make a example for you if you give me the information
    >
    >
    > --
    > Regards Ron de Bruin
    > http://www.rondebruin.nl
    >
    >
    > "wastedwings" <[email protected]> wrote in message news:[email protected]...
    > > Ok, I tried that. Now when I check the print preview, it prints like 17 pages
    > > of empty cells. How can I create a macro to Print using "print if cells
    > > contain...."?
    > >
    > > "Ron de Bruin" wrote:
    > >
    > >> >> but contain links to another worksheet for future linking
    > >>
    > >> Maybe this is a easy solution for you
    > >>
    > >> If you have zero's in the cells then you can use
    > >> Tools>Options...View
    > >> Uncheck Zero values
    > >>
    > >> --
    > >> Regards Ron de Bruin
    > >> http://www.rondebruin.nl
    > >>
    > >>
    > >> "wastedwings" <[email protected]> wrote in message news:[email protected]...
    > >> >I have a worksheet that contains information that updates from another
    > >> > worksheet (contains links). I print the worksheet out each time it is
    > >> > updated, but I would like to create a macro that would automatically select
    > >> > the print area of the cells that contain information, instead of going in and
    > >> > selecting the print area. Since there are cells that do not have information,
    > >> > but contain links to another worksheet for future linking, hitting the print
    > >> > button will not print the cells that contain information only, but will only
    > >> > print a portion of the worksheet.
    > >> >
    > >> > "Ron de Bruin" wrote:
    > >> >
    > >> >> Hi wastedwings
    > >> >>
    > >> >> Can you give more information
    > >> >>
    > >> >>
    > >> >> --
    > >> >> Regards Ron de Bruin
    > >> >> http://www.rondebruin.nl
    > >> >>
    > >> >>
    > >> >> "wastedwings" <[email protected]> wrote in message
    > >> >> news:[email protected]...
    > >> >> > How do I create a macro to automatically select the print area that has
    > >> >> > contents in certain cells?
    > >> >>
    > >> >>
    > >> >>
    > >>
    > >>
    > >>

    >
    >
    >


  13. #13
    Ron de Bruin
    Guest

    Re: Create a print macro that would automatically select print are

    OK

    Try this for a sheet named "Sheet1"

    Note: I filter on the A column for non zeros so i assume that you don't have zeros in your
    data in column A.(only zeros below your data)

    Delete preview:=True if it is working correct

    Sub Test_With_AutoFilter()
    Dim WS As Worksheet
    Dim rng As Range
    Dim Str As String

    Set WS = Sheets("sheet1") '<<< Change
    'A1 is the top left cell of your filter range and the header of the first column
    Set rng = WS.Range("A1").CurrentRegion '<<< Change
    Str = "<>0" '<<< Change

    'Close AutoFilter first
    WS.AutoFilterMode = False

    'This example filter on the first column in the range (change the field if needed)
    rng.AutoFilter Field:=1, Criteria1:=Str
    WS.PrintOut preview:=True
    WS.AutoFilterMode = False
    End Sub


    --
    Regards Ron de Bruin
    http://www.rondebruin.nl


    "wastedwings" <[email protected]> wrote in message news:[email protected]...
    > The data consists of columns A through E with the header row being on Row 1
    >
    > "Ron de Bruin" wrote:
    >
    >> We can make a filter / print macro
    >> Do you have headers above your data and if you do in which row
    >> Can we check one column in your data table if it contains data <> then 0 (which column)
    >>
    >> I will make a example for you if you give me the information
    >>
    >>
    >> --
    >> Regards Ron de Bruin
    >> http://www.rondebruin.nl
    >>
    >>
    >> "wastedwings" <[email protected]> wrote in message news:[email protected]...
    >> > Ok, I tried that. Now when I check the print preview, it prints like 17 pages
    >> > of empty cells. How can I create a macro to Print using "print if cells
    >> > contain...."?
    >> >
    >> > "Ron de Bruin" wrote:
    >> >
    >> >> >> but contain links to another worksheet for future linking
    >> >>
    >> >> Maybe this is a easy solution for you
    >> >>
    >> >> If you have zero's in the cells then you can use
    >> >> Tools>Options...View
    >> >> Uncheck Zero values
    >> >>
    >> >> --
    >> >> Regards Ron de Bruin
    >> >> http://www.rondebruin.nl
    >> >>
    >> >>
    >> >> "wastedwings" <[email protected]> wrote in message
    >> >> news:[email protected]...
    >> >> >I have a worksheet that contains information that updates from another
    >> >> > worksheet (contains links). I print the worksheet out each time it is
    >> >> > updated, but I would like to create a macro that would automatically select
    >> >> > the print area of the cells that contain information, instead of going in and
    >> >> > selecting the print area. Since there are cells that do not have information,
    >> >> > but contain links to another worksheet for future linking, hitting the print
    >> >> > button will not print the cells that contain information only, but will only
    >> >> > print a portion of the worksheet.
    >> >> >
    >> >> > "Ron de Bruin" wrote:
    >> >> >
    >> >> >> Hi wastedwings
    >> >> >>
    >> >> >> Can you give more information
    >> >> >>
    >> >> >>
    >> >> >> --
    >> >> >> Regards Ron de Bruin
    >> >> >> http://www.rondebruin.nl
    >> >> >>
    >> >> >>
    >> >> >> "wastedwings" <[email protected]> wrote in message
    >> >> >> news:[email protected]...
    >> >> >> > How do I create a macro to automatically select the print area that has
    >> >> >> > contents in certain cells?
    >> >> >>
    >> >> >>
    >> >> >>
    >> >>
    >> >>
    >> >>

    >>
    >>
    >>




  14. #14
    wastedwings
    Guest

    Re: Create a print macro that would automatically select print are

    Ok, I tried that. Now when I check the print preview, it prints like 17 pages
    of empty cells. How can I create a macro to Print using "print if cells
    contain...."?

    "Ron de Bruin" wrote:

    > >> but contain links to another worksheet for future linking

    >
    > Maybe this is a easy solution for you
    >
    > If you have zero's in the cells then you can use
    > Tools>Options...View
    > Uncheck Zero values
    >
    > --
    > Regards Ron de Bruin
    > http://www.rondebruin.nl
    >
    >
    > "wastedwings" <[email protected]> wrote in message news:[email protected]...
    > >I have a worksheet that contains information that updates from another
    > > worksheet (contains links). I print the worksheet out each time it is
    > > updated, but I would like to create a macro that would automatically select
    > > the print area of the cells that contain information, instead of going in and
    > > selecting the print area. Since there are cells that do not have information,
    > > but contain links to another worksheet for future linking, hitting the print
    > > button will not print the cells that contain information only, but will only
    > > print a portion of the worksheet.
    > >
    > > "Ron de Bruin" wrote:
    > >
    > >> Hi wastedwings
    > >>
    > >> Can you give more information
    > >>
    > >>
    > >> --
    > >> Regards Ron de Bruin
    > >> http://www.rondebruin.nl
    > >>
    > >>
    > >> "wastedwings" <[email protected]> wrote in message news:[email protected]...
    > >> > How do I create a macro to automatically select the print area that has
    > >> > contents in certain cells?
    > >>
    > >>
    > >>

    >
    >
    >


  15. #15
    Ron de Bruin
    Guest

    Re: Create a print macro that would automatically select print are

    >> but contain links to another worksheet for future linking

    Maybe this is a easy solution for you

    If you have zero's in the cells then you can use
    Tools>Options...View
    Uncheck Zero values

    --
    Regards Ron de Bruin
    http://www.rondebruin.nl


    "wastedwings" <[email protected]> wrote in message news:[email protected]...
    >I have a worksheet that contains information that updates from another
    > worksheet (contains links). I print the worksheet out each time it is
    > updated, but I would like to create a macro that would automatically select
    > the print area of the cells that contain information, instead of going in and
    > selecting the print area. Since there are cells that do not have information,
    > but contain links to another worksheet for future linking, hitting the print
    > button will not print the cells that contain information only, but will only
    > print a portion of the worksheet.
    >
    > "Ron de Bruin" wrote:
    >
    >> Hi wastedwings
    >>
    >> Can you give more information
    >>
    >>
    >> --
    >> Regards Ron de Bruin
    >> http://www.rondebruin.nl
    >>
    >>
    >> "wastedwings" <[email protected]> wrote in message news:[email protected]...
    >> > How do I create a macro to automatically select the print area that has
    >> > contents in certain cells?

    >>
    >>
    >>




  16. #16
    Ron de Bruin
    Guest

    Re: Create a print macro that would automatically select print are

    We can make a filter / print macro
    Do you have headers above your data and if you do in which row
    Can we check one column in your data table if it contains data <> then 0 (which column)

    I will make a example for you if you give me the information


    --
    Regards Ron de Bruin
    http://www.rondebruin.nl


    "wastedwings" <[email protected]> wrote in message news:[email protected]...
    > Ok, I tried that. Now when I check the print preview, it prints like 17 pages
    > of empty cells. How can I create a macro to Print using "print if cells
    > contain...."?
    >
    > "Ron de Bruin" wrote:
    >
    >> >> but contain links to another worksheet for future linking

    >>
    >> Maybe this is a easy solution for you
    >>
    >> If you have zero's in the cells then you can use
    >> Tools>Options...View
    >> Uncheck Zero values
    >>
    >> --
    >> Regards Ron de Bruin
    >> http://www.rondebruin.nl
    >>
    >>
    >> "wastedwings" <[email protected]> wrote in message news:[email protected]...
    >> >I have a worksheet that contains information that updates from another
    >> > worksheet (contains links). I print the worksheet out each time it is
    >> > updated, but I would like to create a macro that would automatically select
    >> > the print area of the cells that contain information, instead of going in and
    >> > selecting the print area. Since there are cells that do not have information,
    >> > but contain links to another worksheet for future linking, hitting the print
    >> > button will not print the cells that contain information only, but will only
    >> > print a portion of the worksheet.
    >> >
    >> > "Ron de Bruin" wrote:
    >> >
    >> >> Hi wastedwings
    >> >>
    >> >> Can you give more information
    >> >>
    >> >>
    >> >> --
    >> >> Regards Ron de Bruin
    >> >> http://www.rondebruin.nl
    >> >>
    >> >>
    >> >> "wastedwings" <[email protected]> wrote in message
    >> >> news:[email protected]...
    >> >> > How do I create a macro to automatically select the print area that has
    >> >> > contents in certain cells?
    >> >>
    >> >>
    >> >>

    >>
    >>
    >>




  17. #17
    wastedwings
    Guest

    Re: Create a print macro that would automatically select print are

    The data consists of columns A through E with the header row being on Row 1

    "Ron de Bruin" wrote:

    > We can make a filter / print macro
    > Do you have headers above your data and if you do in which row
    > Can we check one column in your data table if it contains data <> then 0 (which column)
    >
    > I will make a example for you if you give me the information
    >
    >
    > --
    > Regards Ron de Bruin
    > http://www.rondebruin.nl
    >
    >
    > "wastedwings" <[email protected]> wrote in message news:[email protected]...
    > > Ok, I tried that. Now when I check the print preview, it prints like 17 pages
    > > of empty cells. How can I create a macro to Print using "print if cells
    > > contain...."?
    > >
    > > "Ron de Bruin" wrote:
    > >
    > >> >> but contain links to another worksheet for future linking
    > >>
    > >> Maybe this is a easy solution for you
    > >>
    > >> If you have zero's in the cells then you can use
    > >> Tools>Options...View
    > >> Uncheck Zero values
    > >>
    > >> --
    > >> Regards Ron de Bruin
    > >> http://www.rondebruin.nl
    > >>
    > >>
    > >> "wastedwings" <[email protected]> wrote in message news:[email protected]...
    > >> >I have a worksheet that contains information that updates from another
    > >> > worksheet (contains links). I print the worksheet out each time it is
    > >> > updated, but I would like to create a macro that would automatically select
    > >> > the print area of the cells that contain information, instead of going in and
    > >> > selecting the print area. Since there are cells that do not have information,
    > >> > but contain links to another worksheet for future linking, hitting the print
    > >> > button will not print the cells that contain information only, but will only
    > >> > print a portion of the worksheet.
    > >> >
    > >> > "Ron de Bruin" wrote:
    > >> >
    > >> >> Hi wastedwings
    > >> >>
    > >> >> Can you give more information
    > >> >>
    > >> >>
    > >> >> --
    > >> >> Regards Ron de Bruin
    > >> >> http://www.rondebruin.nl
    > >> >>
    > >> >>
    > >> >> "wastedwings" <[email protected]> wrote in message
    > >> >> news:[email protected]...
    > >> >> > How do I create a macro to automatically select the print area that has
    > >> >> > contents in certain cells?
    > >> >>
    > >> >>
    > >> >>
    > >>
    > >>
    > >>

    >
    >
    >


  18. #18
    wastedwings
    Guest

    Re: Create a print macro that would automatically select print are

    Ok, I tried that. Now when I check the print preview, it prints like 17 pages
    of empty cells. How can I create a macro to Print using "print if cells
    contain...."?

    "Ron de Bruin" wrote:

    > >> but contain links to another worksheet for future linking

    >
    > Maybe this is a easy solution for you
    >
    > If you have zero's in the cells then you can use
    > Tools>Options...View
    > Uncheck Zero values
    >
    > --
    > Regards Ron de Bruin
    > http://www.rondebruin.nl
    >
    >
    > "wastedwings" <[email protected]> wrote in message news:[email protected]...
    > >I have a worksheet that contains information that updates from another
    > > worksheet (contains links). I print the worksheet out each time it is
    > > updated, but I would like to create a macro that would automatically select
    > > the print area of the cells that contain information, instead of going in and
    > > selecting the print area. Since there are cells that do not have information,
    > > but contain links to another worksheet for future linking, hitting the print
    > > button will not print the cells that contain information only, but will only
    > > print a portion of the worksheet.
    > >
    > > "Ron de Bruin" wrote:
    > >
    > >> Hi wastedwings
    > >>
    > >> Can you give more information
    > >>
    > >>
    > >> --
    > >> Regards Ron de Bruin
    > >> http://www.rondebruin.nl
    > >>
    > >>
    > >> "wastedwings" <[email protected]> wrote in message news:[email protected]...
    > >> > How do I create a macro to automatically select the print area that has
    > >> > contents in certain cells?
    > >>
    > >>
    > >>

    >
    >
    >


  19. #19
    Ron de Bruin
    Guest

    Re: Create a print macro that would automatically select print area?

    Hi wastedwings

    Can you give more information


    --
    Regards Ron de Bruin
    http://www.rondebruin.nl


    "wastedwings" <[email protected]> wrote in message news:[email protected]...
    > How do I create a macro to automatically select the print area that has
    > contents in certain cells?




  20. #20
    Ron de Bruin
    Guest

    Re: Create a print macro that would automatically select print are

    OK

    Try this for a sheet named "Sheet1"

    Note: I filter on the A column for non zeros so i assume that you don't have zeros in your
    data in column A.(only zeros below your data)

    Delete preview:=True if it is working correct

    Sub Test_With_AutoFilter()
    Dim WS As Worksheet
    Dim rng As Range
    Dim Str As String

    Set WS = Sheets("sheet1") '<<< Change
    'A1 is the top left cell of your filter range and the header of the first column
    Set rng = WS.Range("A1").CurrentRegion '<<< Change
    Str = "<>0" '<<< Change

    'Close AutoFilter first
    WS.AutoFilterMode = False

    'This example filter on the first column in the range (change the field if needed)
    rng.AutoFilter Field:=1, Criteria1:=Str
    WS.PrintOut preview:=True
    WS.AutoFilterMode = False
    End Sub


    --
    Regards Ron de Bruin
    http://www.rondebruin.nl


    "wastedwings" <[email protected]> wrote in message news:[email protected]...
    > The data consists of columns A through E with the header row being on Row 1
    >
    > "Ron de Bruin" wrote:
    >
    >> We can make a filter / print macro
    >> Do you have headers above your data and if you do in which row
    >> Can we check one column in your data table if it contains data <> then 0 (which column)
    >>
    >> I will make a example for you if you give me the information
    >>
    >>
    >> --
    >> Regards Ron de Bruin
    >> http://www.rondebruin.nl
    >>
    >>
    >> "wastedwings" <[email protected]> wrote in message news:[email protected]...
    >> > Ok, I tried that. Now when I check the print preview, it prints like 17 pages
    >> > of empty cells. How can I create a macro to Print using "print if cells
    >> > contain...."?
    >> >
    >> > "Ron de Bruin" wrote:
    >> >
    >> >> >> but contain links to another worksheet for future linking
    >> >>
    >> >> Maybe this is a easy solution for you
    >> >>
    >> >> If you have zero's in the cells then you can use
    >> >> Tools>Options...View
    >> >> Uncheck Zero values
    >> >>
    >> >> --
    >> >> Regards Ron de Bruin
    >> >> http://www.rondebruin.nl
    >> >>
    >> >>
    >> >> "wastedwings" <[email protected]> wrote in message
    >> >> news:[email protected]...
    >> >> >I have a worksheet that contains information that updates from another
    >> >> > worksheet (contains links). I print the worksheet out each time it is
    >> >> > updated, but I would like to create a macro that would automatically select
    >> >> > the print area of the cells that contain information, instead of going in and
    >> >> > selecting the print area. Since there are cells that do not have information,
    >> >> > but contain links to another worksheet for future linking, hitting the print
    >> >> > button will not print the cells that contain information only, but will only
    >> >> > print a portion of the worksheet.
    >> >> >
    >> >> > "Ron de Bruin" wrote:
    >> >> >
    >> >> >> Hi wastedwings
    >> >> >>
    >> >> >> Can you give more information
    >> >> >>
    >> >> >>
    >> >> >> --
    >> >> >> Regards Ron de Bruin
    >> >> >> http://www.rondebruin.nl
    >> >> >>
    >> >> >>
    >> >> >> "wastedwings" <[email protected]> wrote in message
    >> >> >> news:[email protected]...
    >> >> >> > How do I create a macro to automatically select the print area that has
    >> >> >> > contents in certain cells?
    >> >> >>
    >> >> >>
    >> >> >>
    >> >>
    >> >>
    >> >>

    >>
    >>
    >>




  21. #21
    wastedwings
    Guest

    Re: Create a print macro that would automatically select print are

    I have a worksheet that contains information that updates from another
    worksheet (contains links). I print the worksheet out each time it is
    updated, but I would like to create a macro that would automatically select
    the print area of the cells that contain information, instead of going in and
    selecting the print area. Since there are cells that do not have information,
    but contain links to another worksheet for future linking, hitting the print
    button will not print the cells that contain information only, but will only
    print a portion of the worksheet.

    "Ron de Bruin" wrote:

    > Hi wastedwings
    >
    > Can you give more information
    >
    >
    > --
    > Regards Ron de Bruin
    > http://www.rondebruin.nl
    >
    >
    > "wastedwings" <[email protected]> wrote in message news:[email protected]...
    > > How do I create a macro to automatically select the print area that has
    > > contents in certain cells?

    >
    >
    >


  22. #22
    wastedwings
    Guest

    Re: Create a print macro that would automatically select print are

    The data consists of columns A through E with the header row being on Row 1

    "Ron de Bruin" wrote:

    > We can make a filter / print macro
    > Do you have headers above your data and if you do in which row
    > Can we check one column in your data table if it contains data <> then 0 (which column)
    >
    > I will make a example for you if you give me the information
    >
    >
    > --
    > Regards Ron de Bruin
    > http://www.rondebruin.nl
    >
    >
    > "wastedwings" <[email protected]> wrote in message news:[email protected]...
    > > Ok, I tried that. Now when I check the print preview, it prints like 17 pages
    > > of empty cells. How can I create a macro to Print using "print if cells
    > > contain...."?
    > >
    > > "Ron de Bruin" wrote:
    > >
    > >> >> but contain links to another worksheet for future linking
    > >>
    > >> Maybe this is a easy solution for you
    > >>
    > >> If you have zero's in the cells then you can use
    > >> Tools>Options...View
    > >> Uncheck Zero values
    > >>
    > >> --
    > >> Regards Ron de Bruin
    > >> http://www.rondebruin.nl
    > >>
    > >>
    > >> "wastedwings" <[email protected]> wrote in message news:[email protected]...
    > >> >I have a worksheet that contains information that updates from another
    > >> > worksheet (contains links). I print the worksheet out each time it is
    > >> > updated, but I would like to create a macro that would automatically select
    > >> > the print area of the cells that contain information, instead of going in and
    > >> > selecting the print area. Since there are cells that do not have information,
    > >> > but contain links to another worksheet for future linking, hitting the print
    > >> > button will not print the cells that contain information only, but will only
    > >> > print a portion of the worksheet.
    > >> >
    > >> > "Ron de Bruin" wrote:
    > >> >
    > >> >> Hi wastedwings
    > >> >>
    > >> >> Can you give more information
    > >> >>
    > >> >>
    > >> >> --
    > >> >> Regards Ron de Bruin
    > >> >> http://www.rondebruin.nl
    > >> >>
    > >> >>
    > >> >> "wastedwings" <[email protected]> wrote in message
    > >> >> news:[email protected]...
    > >> >> > How do I create a macro to automatically select the print area that has
    > >> >> > contents in certain cells?
    > >> >>
    > >> >>
    > >> >>
    > >>
    > >>
    > >>

    >
    >
    >


  23. #23
    wastedwings
    Guest

    Re: Create a print macro that would automatically select print are

    Ok, I tried that. Now when I check the print preview, it prints like 17 pages
    of empty cells. How can I create a macro to Print using "print if cells
    contain...."?

    "Ron de Bruin" wrote:

    > >> but contain links to another worksheet for future linking

    >
    > Maybe this is a easy solution for you
    >
    > If you have zero's in the cells then you can use
    > Tools>Options...View
    > Uncheck Zero values
    >
    > --
    > Regards Ron de Bruin
    > http://www.rondebruin.nl
    >
    >
    > "wastedwings" <[email protected]> wrote in message news:[email protected]...
    > >I have a worksheet that contains information that updates from another
    > > worksheet (contains links). I print the worksheet out each time it is
    > > updated, but I would like to create a macro that would automatically select
    > > the print area of the cells that contain information, instead of going in and
    > > selecting the print area. Since there are cells that do not have information,
    > > but contain links to another worksheet for future linking, hitting the print
    > > button will not print the cells that contain information only, but will only
    > > print a portion of the worksheet.
    > >
    > > "Ron de Bruin" wrote:
    > >
    > >> Hi wastedwings
    > >>
    > >> Can you give more information
    > >>
    > >>
    > >> --
    > >> Regards Ron de Bruin
    > >> http://www.rondebruin.nl
    > >>
    > >>
    > >> "wastedwings" <[email protected]> wrote in message news:[email protected]...
    > >> > How do I create a macro to automatically select the print area that has
    > >> > contents in certain cells?
    > >>
    > >>
    > >>

    >
    >
    >


  24. #24
    Ron de Bruin
    Guest

    Re: Create a print macro that would automatically select print are

    OK

    Try this for a sheet named "Sheet1"

    Note: I filter on the A column for non zeros so i assume that you don't have zeros in your
    data in column A.(only zeros below your data)

    Delete preview:=True if it is working correct

    Sub Test_With_AutoFilter()
    Dim WS As Worksheet
    Dim rng As Range
    Dim Str As String

    Set WS = Sheets("sheet1") '<<< Change
    'A1 is the top left cell of your filter range and the header of the first column
    Set rng = WS.Range("A1").CurrentRegion '<<< Change
    Str = "<>0" '<<< Change

    'Close AutoFilter first
    WS.AutoFilterMode = False

    'This example filter on the first column in the range (change the field if needed)
    rng.AutoFilter Field:=1, Criteria1:=Str
    WS.PrintOut preview:=True
    WS.AutoFilterMode = False
    End Sub


    --
    Regards Ron de Bruin
    http://www.rondebruin.nl


    "wastedwings" <[email protected]> wrote in message news:[email protected]...
    > The data consists of columns A through E with the header row being on Row 1
    >
    > "Ron de Bruin" wrote:
    >
    >> We can make a filter / print macro
    >> Do you have headers above your data and if you do in which row
    >> Can we check one column in your data table if it contains data <> then 0 (which column)
    >>
    >> I will make a example for you if you give me the information
    >>
    >>
    >> --
    >> Regards Ron de Bruin
    >> http://www.rondebruin.nl
    >>
    >>
    >> "wastedwings" <[email protected]> wrote in message news:[email protected]...
    >> > Ok, I tried that. Now when I check the print preview, it prints like 17 pages
    >> > of empty cells. How can I create a macro to Print using "print if cells
    >> > contain...."?
    >> >
    >> > "Ron de Bruin" wrote:
    >> >
    >> >> >> but contain links to another worksheet for future linking
    >> >>
    >> >> Maybe this is a easy solution for you
    >> >>
    >> >> If you have zero's in the cells then you can use
    >> >> Tools>Options...View
    >> >> Uncheck Zero values
    >> >>
    >> >> --
    >> >> Regards Ron de Bruin
    >> >> http://www.rondebruin.nl
    >> >>
    >> >>
    >> >> "wastedwings" <[email protected]> wrote in message
    >> >> news:[email protected]...
    >> >> >I have a worksheet that contains information that updates from another
    >> >> > worksheet (contains links). I print the worksheet out each time it is
    >> >> > updated, but I would like to create a macro that would automatically select
    >> >> > the print area of the cells that contain information, instead of going in and
    >> >> > selecting the print area. Since there are cells that do not have information,
    >> >> > but contain links to another worksheet for future linking, hitting the print
    >> >> > button will not print the cells that contain information only, but will only
    >> >> > print a portion of the worksheet.
    >> >> >
    >> >> > "Ron de Bruin" wrote:
    >> >> >
    >> >> >> Hi wastedwings
    >> >> >>
    >> >> >> Can you give more information
    >> >> >>
    >> >> >>
    >> >> >> --
    >> >> >> Regards Ron de Bruin
    >> >> >> http://www.rondebruin.nl
    >> >> >>
    >> >> >>
    >> >> >> "wastedwings" <[email protected]> wrote in message
    >> >> >> news:[email protected]...
    >> >> >> > How do I create a macro to automatically select the print area that has
    >> >> >> > contents in certain cells?
    >> >> >>
    >> >> >>
    >> >> >>
    >> >>
    >> >>
    >> >>

    >>
    >>
    >>




  25. #25
    Ron de Bruin
    Guest

    Re: Create a print macro that would automatically select print are

    We can make a filter / print macro
    Do you have headers above your data and if you do in which row
    Can we check one column in your data table if it contains data <> then 0 (which column)

    I will make a example for you if you give me the information


    --
    Regards Ron de Bruin
    http://www.rondebruin.nl


    "wastedwings" <[email protected]> wrote in message news:[email protected]...
    > Ok, I tried that. Now when I check the print preview, it prints like 17 pages
    > of empty cells. How can I create a macro to Print using "print if cells
    > contain...."?
    >
    > "Ron de Bruin" wrote:
    >
    >> >> but contain links to another worksheet for future linking

    >>
    >> Maybe this is a easy solution for you
    >>
    >> If you have zero's in the cells then you can use
    >> Tools>Options...View
    >> Uncheck Zero values
    >>
    >> --
    >> Regards Ron de Bruin
    >> http://www.rondebruin.nl
    >>
    >>
    >> "wastedwings" <[email protected]> wrote in message news:[email protected]...
    >> >I have a worksheet that contains information that updates from another
    >> > worksheet (contains links). I print the worksheet out each time it is
    >> > updated, but I would like to create a macro that would automatically select
    >> > the print area of the cells that contain information, instead of going in and
    >> > selecting the print area. Since there are cells that do not have information,
    >> > but contain links to another worksheet for future linking, hitting the print
    >> > button will not print the cells that contain information only, but will only
    >> > print a portion of the worksheet.
    >> >
    >> > "Ron de Bruin" wrote:
    >> >
    >> >> Hi wastedwings
    >> >>
    >> >> Can you give more information
    >> >>
    >> >>
    >> >> --
    >> >> Regards Ron de Bruin
    >> >> http://www.rondebruin.nl
    >> >>
    >> >>
    >> >> "wastedwings" <[email protected]> wrote in message
    >> >> news:[email protected]...
    >> >> > How do I create a macro to automatically select the print area that has
    >> >> > contents in certain cells?
    >> >>
    >> >>
    >> >>

    >>
    >>
    >>




  26. #26
    Ron de Bruin
    Guest

    Re: Create a print macro that would automatically select print are

    >> but contain links to another worksheet for future linking

    Maybe this is a easy solution for you

    If you have zero's in the cells then you can use
    Tools>Options...View
    Uncheck Zero values

    --
    Regards Ron de Bruin
    http://www.rondebruin.nl


    "wastedwings" <[email protected]> wrote in message news:[email protected]...
    >I have a worksheet that contains information that updates from another
    > worksheet (contains links). I print the worksheet out each time it is
    > updated, but I would like to create a macro that would automatically select
    > the print area of the cells that contain information, instead of going in and
    > selecting the print area. Since there are cells that do not have information,
    > but contain links to another worksheet for future linking, hitting the print
    > button will not print the cells that contain information only, but will only
    > print a portion of the worksheet.
    >
    > "Ron de Bruin" wrote:
    >
    >> Hi wastedwings
    >>
    >> Can you give more information
    >>
    >>
    >> --
    >> Regards Ron de Bruin
    >> http://www.rondebruin.nl
    >>
    >>
    >> "wastedwings" <[email protected]> wrote in message news:[email protected]...
    >> > How do I create a macro to automatically select the print area that has
    >> > contents in certain cells?

    >>
    >>
    >>




  27. #27
    wastedwings
    Guest

    Re: Create a print macro that would automatically select print are

    I have a worksheet that contains information that updates from another
    worksheet (contains links). I print the worksheet out each time it is
    updated, but I would like to create a macro that would automatically select
    the print area of the cells that contain information, instead of going in and
    selecting the print area. Since there are cells that do not have information,
    but contain links to another worksheet for future linking, hitting the print
    button will not print the cells that contain information only, but will only
    print a portion of the worksheet.

    "Ron de Bruin" wrote:

    > Hi wastedwings
    >
    > Can you give more information
    >
    >
    > --
    > Regards Ron de Bruin
    > http://www.rondebruin.nl
    >
    >
    > "wastedwings" <[email protected]> wrote in message news:[email protected]...
    > > How do I create a macro to automatically select the print area that has
    > > contents in certain cells?

    >
    >
    >


  28. #28
    Ron de Bruin
    Guest

    Re: Create a print macro that would automatically select print area?

    Hi wastedwings

    Can you give more information


    --
    Regards Ron de Bruin
    http://www.rondebruin.nl


    "wastedwings" <[email protected]> wrote in message news:[email protected]...
    > How do I create a macro to automatically select the print area that has
    > contents in certain cells?




  29. #29
    Ron de Bruin
    Guest

    Re: Create a print macro that would automatically select print are

    We can make a filter / print macro
    Do you have headers above your data and if you do in which row
    Can we check one column in your data table if it contains data <> then 0 (which column)

    I will make a example for you if you give me the information


    --
    Regards Ron de Bruin
    http://www.rondebruin.nl


    "wastedwings" <[email protected]> wrote in message news:[email protected]...
    > Ok, I tried that. Now when I check the print preview, it prints like 17 pages
    > of empty cells. How can I create a macro to Print using "print if cells
    > contain...."?
    >
    > "Ron de Bruin" wrote:
    >
    >> >> but contain links to another worksheet for future linking

    >>
    >> Maybe this is a easy solution for you
    >>
    >> If you have zero's in the cells then you can use
    >> Tools>Options...View
    >> Uncheck Zero values
    >>
    >> --
    >> Regards Ron de Bruin
    >> http://www.rondebruin.nl
    >>
    >>
    >> "wastedwings" <[email protected]> wrote in message news:[email protected]...
    >> >I have a worksheet that contains information that updates from another
    >> > worksheet (contains links). I print the worksheet out each time it is
    >> > updated, but I would like to create a macro that would automatically select
    >> > the print area of the cells that contain information, instead of going in and
    >> > selecting the print area. Since there are cells that do not have information,
    >> > but contain links to another worksheet for future linking, hitting the print
    >> > button will not print the cells that contain information only, but will only
    >> > print a portion of the worksheet.
    >> >
    >> > "Ron de Bruin" wrote:
    >> >
    >> >> Hi wastedwings
    >> >>
    >> >> Can you give more information
    >> >>
    >> >>
    >> >> --
    >> >> Regards Ron de Bruin
    >> >> http://www.rondebruin.nl
    >> >>
    >> >>
    >> >> "wastedwings" <[email protected]> wrote in message
    >> >> news:[email protected]...
    >> >> > How do I create a macro to automatically select the print area that has
    >> >> > contents in certain cells?
    >> >>
    >> >>
    >> >>

    >>
    >>
    >>




  30. #30
    wastedwings
    Guest

    Re: Create a print macro that would automatically select print are

    Ok, I tried that. Now when I check the print preview, it prints like 17 pages
    of empty cells. How can I create a macro to Print using "print if cells
    contain...."?

    "Ron de Bruin" wrote:

    > >> but contain links to another worksheet for future linking

    >
    > Maybe this is a easy solution for you
    >
    > If you have zero's in the cells then you can use
    > Tools>Options...View
    > Uncheck Zero values
    >
    > --
    > Regards Ron de Bruin
    > http://www.rondebruin.nl
    >
    >
    > "wastedwings" <[email protected]> wrote in message news:[email protected]...
    > >I have a worksheet that contains information that updates from another
    > > worksheet (contains links). I print the worksheet out each time it is
    > > updated, but I would like to create a macro that would automatically select
    > > the print area of the cells that contain information, instead of going in and
    > > selecting the print area. Since there are cells that do not have information,
    > > but contain links to another worksheet for future linking, hitting the print
    > > button will not print the cells that contain information only, but will only
    > > print a portion of the worksheet.
    > >
    > > "Ron de Bruin" wrote:
    > >
    > >> Hi wastedwings
    > >>
    > >> Can you give more information
    > >>
    > >>
    > >> --
    > >> Regards Ron de Bruin
    > >> http://www.rondebruin.nl
    > >>
    > >>
    > >> "wastedwings" <[email protected]> wrote in message news:[email protected]...
    > >> > How do I create a macro to automatically select the print area that has
    > >> > contents in certain cells?
    > >>
    > >>
    > >>

    >
    >
    >


  31. #31
    wastedwings
    Guest

    Create a print macro that would automatically select print area?

    How do I create a macro to automatically select the print area that has
    contents in certain cells?

  32. #32
    wastedwings
    Guest

    Re: Create a print macro that would automatically select print are

    The data consists of columns A through E with the header row being on Row 1

    "Ron de Bruin" wrote:

    > We can make a filter / print macro
    > Do you have headers above your data and if you do in which row
    > Can we check one column in your data table if it contains data <> then 0 (which column)
    >
    > I will make a example for you if you give me the information
    >
    >
    > --
    > Regards Ron de Bruin
    > http://www.rondebruin.nl
    >
    >
    > "wastedwings" <[email protected]> wrote in message news:[email protected]...
    > > Ok, I tried that. Now when I check the print preview, it prints like 17 pages
    > > of empty cells. How can I create a macro to Print using "print if cells
    > > contain...."?
    > >
    > > "Ron de Bruin" wrote:
    > >
    > >> >> but contain links to another worksheet for future linking
    > >>
    > >> Maybe this is a easy solution for you
    > >>
    > >> If you have zero's in the cells then you can use
    > >> Tools>Options...View
    > >> Uncheck Zero values
    > >>
    > >> --
    > >> Regards Ron de Bruin
    > >> http://www.rondebruin.nl
    > >>
    > >>
    > >> "wastedwings" <[email protected]> wrote in message news:[email protected]...
    > >> >I have a worksheet that contains information that updates from another
    > >> > worksheet (contains links). I print the worksheet out each time it is
    > >> > updated, but I would like to create a macro that would automatically select
    > >> > the print area of the cells that contain information, instead of going in and
    > >> > selecting the print area. Since there are cells that do not have information,
    > >> > but contain links to another worksheet for future linking, hitting the print
    > >> > button will not print the cells that contain information only, but will only
    > >> > print a portion of the worksheet.
    > >> >
    > >> > "Ron de Bruin" wrote:
    > >> >
    > >> >> Hi wastedwings
    > >> >>
    > >> >> Can you give more information
    > >> >>
    > >> >>
    > >> >> --
    > >> >> Regards Ron de Bruin
    > >> >> http://www.rondebruin.nl
    > >> >>
    > >> >>
    > >> >> "wastedwings" <[email protected]> wrote in message
    > >> >> news:[email protected]...
    > >> >> > How do I create a macro to automatically select the print area that has
    > >> >> > contents in certain cells?
    > >> >>
    > >> >>
    > >> >>
    > >>
    > >>
    > >>

    >
    >
    >


  33. #33
    Ron de Bruin
    Guest

    Re: Create a print macro that would automatically select print are

    >> but contain links to another worksheet for future linking

    Maybe this is a easy solution for you

    If you have zero's in the cells then you can use
    Tools>Options...View
    Uncheck Zero values

    --
    Regards Ron de Bruin
    http://www.rondebruin.nl


    "wastedwings" <[email protected]> wrote in message news:[email protected]...
    >I have a worksheet that contains information that updates from another
    > worksheet (contains links). I print the worksheet out each time it is
    > updated, but I would like to create a macro that would automatically select
    > the print area of the cells that contain information, instead of going in and
    > selecting the print area. Since there are cells that do not have information,
    > but contain links to another worksheet for future linking, hitting the print
    > button will not print the cells that contain information only, but will only
    > print a portion of the worksheet.
    >
    > "Ron de Bruin" wrote:
    >
    >> Hi wastedwings
    >>
    >> Can you give more information
    >>
    >>
    >> --
    >> Regards Ron de Bruin
    >> http://www.rondebruin.nl
    >>
    >>
    >> "wastedwings" <[email protected]> wrote in message news:[email protected]...
    >> > How do I create a macro to automatically select the print area that has
    >> > contents in certain cells?

    >>
    >>
    >>




  34. #34
    Ron de Bruin
    Guest

    Re: Create a print macro that would automatically select print are

    OK

    Try this for a sheet named "Sheet1"

    Note: I filter on the A column for non zeros so i assume that you don't have zeros in your
    data in column A.(only zeros below your data)

    Delete preview:=True if it is working correct

    Sub Test_With_AutoFilter()
    Dim WS As Worksheet
    Dim rng As Range
    Dim Str As String

    Set WS = Sheets("sheet1") '<<< Change
    'A1 is the top left cell of your filter range and the header of the first column
    Set rng = WS.Range("A1").CurrentRegion '<<< Change
    Str = "<>0" '<<< Change

    'Close AutoFilter first
    WS.AutoFilterMode = False

    'This example filter on the first column in the range (change the field if needed)
    rng.AutoFilter Field:=1, Criteria1:=Str
    WS.PrintOut preview:=True
    WS.AutoFilterMode = False
    End Sub


    --
    Regards Ron de Bruin
    http://www.rondebruin.nl


    "wastedwings" <[email protected]> wrote in message news:[email protected]...
    > The data consists of columns A through E with the header row being on Row 1
    >
    > "Ron de Bruin" wrote:
    >
    >> We can make a filter / print macro
    >> Do you have headers above your data and if you do in which row
    >> Can we check one column in your data table if it contains data <> then 0 (which column)
    >>
    >> I will make a example for you if you give me the information
    >>
    >>
    >> --
    >> Regards Ron de Bruin
    >> http://www.rondebruin.nl
    >>
    >>
    >> "wastedwings" <[email protected]> wrote in message news:[email protected]...
    >> > Ok, I tried that. Now when I check the print preview, it prints like 17 pages
    >> > of empty cells. How can I create a macro to Print using "print if cells
    >> > contain...."?
    >> >
    >> > "Ron de Bruin" wrote:
    >> >
    >> >> >> but contain links to another worksheet for future linking
    >> >>
    >> >> Maybe this is a easy solution for you
    >> >>
    >> >> If you have zero's in the cells then you can use
    >> >> Tools>Options...View
    >> >> Uncheck Zero values
    >> >>
    >> >> --
    >> >> Regards Ron de Bruin
    >> >> http://www.rondebruin.nl
    >> >>
    >> >>
    >> >> "wastedwings" <[email protected]> wrote in message
    >> >> news:[email protected]...
    >> >> >I have a worksheet that contains information that updates from another
    >> >> > worksheet (contains links). I print the worksheet out each time it is
    >> >> > updated, but I would like to create a macro that would automatically select
    >> >> > the print area of the cells that contain information, instead of going in and
    >> >> > selecting the print area. Since there are cells that do not have information,
    >> >> > but contain links to another worksheet for future linking, hitting the print
    >> >> > button will not print the cells that contain information only, but will only
    >> >> > print a portion of the worksheet.
    >> >> >
    >> >> > "Ron de Bruin" wrote:
    >> >> >
    >> >> >> Hi wastedwings
    >> >> >>
    >> >> >> Can you give more information
    >> >> >>
    >> >> >>
    >> >> >> --
    >> >> >> Regards Ron de Bruin
    >> >> >> http://www.rondebruin.nl
    >> >> >>
    >> >> >>
    >> >> >> "wastedwings" <[email protected]> wrote in message
    >> >> >> news:[email protected]...
    >> >> >> > How do I create a macro to automatically select the print area that has
    >> >> >> > contents in certain cells?
    >> >> >>
    >> >> >>
    >> >> >>
    >> >>
    >> >>
    >> >>

    >>
    >>
    >>




  35. #35
    wastedwings
    Guest

    Re: Create a print macro that would automatically select print are

    I have a worksheet that contains information that updates from another
    worksheet (contains links). I print the worksheet out each time it is
    updated, but I would like to create a macro that would automatically select
    the print area of the cells that contain information, instead of going in and
    selecting the print area. Since there are cells that do not have information,
    but contain links to another worksheet for future linking, hitting the print
    button will not print the cells that contain information only, but will only
    print a portion of the worksheet.

    "Ron de Bruin" wrote:

    > Hi wastedwings
    >
    > Can you give more information
    >
    >
    > --
    > Regards Ron de Bruin
    > http://www.rondebruin.nl
    >
    >
    > "wastedwings" <[email protected]> wrote in message news:[email protected]...
    > > How do I create a macro to automatically select the print area that has
    > > contents in certain cells?

    >
    >
    >


  36. #36
    Ron de Bruin
    Guest

    Re: Create a print macro that would automatically select print area?

    Hi wastedwings

    Can you give more information


    --
    Regards Ron de Bruin
    http://www.rondebruin.nl


    "wastedwings" <[email protected]> wrote in message news:[email protected]...
    > How do I create a macro to automatically select the print area that has
    > contents in certain cells?




+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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