+ Reply to Thread
Results 1 to 4 of 4

Dynamic print range

  1. #1
    Registered User
    Join Date
    11-25-2013
    Location
    Overland Park, KS
    MS-Off Ver
    Excel 2010
    Posts
    4

    Dynamic print range

    I am attempting to create a simple print range that for a report, and the report range changes each time I run it. Seems a simple Macro, but I haven't been able to figure it out. Here is what I've done:

    The range starts at a specific cell but the end of the report varies.


    Range("A5").Select
    ActiveCell.Range("A1:B1").Select
    Range(Selection, Selection.End(xlDown)).Select
    ActiveSheet.PageSetup.PrintArea = "$A$5:B99"

    I need the Print Area to be dynamic based on the last row of data. What am I missing?

    Thx

  2. #2
    Forum Expert Solus Rankin's Avatar
    Join Date
    05-24-2013
    Location
    Hollywood, CA
    MS-Off Ver
    Win7 Office 2010 VS Express 2012
    Posts
    2,655

    Re: Dynamic print range

    Please Login or Register  to view this content.
    Thanks,
    Solus


    Please remember the following:

    1. Use [code] code tags [/code]. It keeps posts clean, easy-to-read, and maintains VBA formatting.
    Highlight the code in your post and press the # button in the toolbar.
    2. Show appreciation to those who have helped you by clicking below their posts.
    3. If you are happy with a solution to your problem, mark the thread as [SOLVED] using the tools at the top.

    "Slow is smooth, smooth is fast."

  3. #3
    Registered User
    Join Date
    11-25-2013
    Location
    Overland Park, KS
    MS-Off Ver
    Excel 2010
    Posts
    4

    Re: Dynamic print range

    Thank you Solus!!

  4. #4
    Forum Expert Solus Rankin's Avatar
    Join Date
    05-24-2013
    Location
    Hollywood, CA
    MS-Off Ver
    Win7 Office 2010 VS Express 2012
    Posts
    2,655

    Re: Dynamic print range

    Glad to help.

+ 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. Dynamic print range
    By Nitefox in forum For Other Platforms(Mac, Google Docs, Mobile OS etc)
    Replies: 21
    Last Post: 09-21-2013, 01:09 PM
  2. [SOLVED] Need ‘Set Print Area’ Code for Dynamic Print Range based on Conditions
    By dosbirn in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 07-16-2013, 12:13 PM
  3. [SOLVED] Automatically Print Once Dynamic Print Range is Identified
    By ccowman in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 01-27-2013, 10:34 AM
  4. Using VBA to print a dynamic range.
    By j_Southern in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 10-23-2012, 05:22 PM
  5. Print Titles with Dynamic Print Range
    By Daeghen in forum Excel General
    Replies: 0
    Last Post: 08-01-2011, 12:11 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