+ Reply to Thread
Results 1 to 2 of 2

Print ranges based on cell value

  1. #1
    John
    Guest

    Print ranges based on cell value

    I'm trying to create a button attached to a Macro that will print a constant
    range of cells for a header, and several variable ranges depending on the
    value of a particular cell in each variable range, and a selection of a
    constant range for a footer.

    PROBLEM, I have read the VBA for dummies and well, its not the right book or
    I'm REALLY a dummy cause I cant figure out what I should be doing.

    Any thoughts on the code I need? Or point me in the right direction??

    Thanks,
    John

  2. #2
    Dan Hatola
    Guest

    RE: Print ranges based on cell value

    John,
    You will need to set the print range and then use the printout method to
    print the worksheet. Here is an example:

    Worksheets("Sheet1").PageSetup.PrintArea = "$A$1:$E$25"
    Worksheets("Sheet1").PrintOut

    Note: There are a lot of print settings that can be changed using VBA. I
    recommend recording a macro and then going and looking at the code that is
    generated for ideas.

    Dan

    "John" wrote:

    > I'm trying to create a button attached to a Macro that will print a constant
    > range of cells for a header, and several variable ranges depending on the
    > value of a particular cell in each variable range, and a selection of a
    > constant range for a footer.
    >
    > PROBLEM, I have read the VBA for dummies and well, its not the right book or
    > I'm REALLY a dummy cause I cant figure out what I should be doing.
    >
    > Any thoughts on the code I need? Or point me in the right direction??
    >
    > Thanks,
    > John


+ 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