+ Reply to Thread
Results 1 to 12 of 12

Help needed to change print code

  1. #1
    Valued Forum Contributor
    Join Date
    06-30-2005
    Location
    Verwood, Dorset, England
    MS-Off Ver
    Excel 2000
    Posts
    479

    Help needed to change print code

    I use the below code to print individual target sheets for stores

    The worksheet "Targets Eire" contains a table with targets for each store (Range A3:N13, Row A is a Header Row), below this row 14 is blank and there is more data in rows 15 to 25

    The worksheet "Individual Store Targets Eire" is a template, fed by the worksheet "Targets Eire" with targets for each store

    How can I change the code, so that it only prints rows 4:13?


    Please Login or Register  to view this content.
    Last edited by Paul Sheppard; 07-22-2013 at 05:41 PM.
    Paul

  2. #2
    Forum Expert jaslake's Avatar
    Join Date
    02-21-2009
    Location
    Atwood Lake in Mid NE Ohio...look it up.
    MS-Off Ver
    Excel 2010 2019
    Posts
    12,749

    Re: Help needed to change print code

    Hi Paul

    Try this
    Please Login or Register  to view this content.
    Last edited by jaslake; 07-17-2013 at 09:01 PM.
    John

    If you have issues with Code I've provided, I appreciate your feedback.

    In the event Code provided resolves your issue, please mark your Thread as SOLVED.

    If you're satisfied by any members response to your issue please use the star icon at the lower left of their post.

  3. #3
    Valued Forum Contributor
    Join Date
    06-30-2005
    Location
    Verwood, Dorset, England
    MS-Off Ver
    Excel 2000
    Posts
    479

    Re: Help needed to change print code

    Hi Jaslake

    Thx for this info, unfortunately it did not work as it still printed a sheet for the data from rows 14 onwards

    Where in my code should I place the code you provided, I put it at the end between Next I and End Sub

    Thx

    Paul

  4. #4
    Forum Expert jaslake's Avatar
    Join Date
    02-21-2009
    Location
    Atwood Lake in Mid NE Ohio...look it up.
    MS-Off Ver
    Excel 2010 2019
    Posts
    12,749

    Re: Help needed to change print code

    Hi Paul

    It'll probably be something like this
    Please Login or Register  to view this content.

  5. #5
    Valued Forum Contributor
    Join Date
    06-30-2005
    Location
    Verwood, Dorset, England
    MS-Off Ver
    Excel 2000
    Posts
    479

    Re: Help needed to change print code

    Hi Jeslake

    This did not work, it gave runtime error 438

    Paul

  6. #6
    Forum Expert jaslake's Avatar
    Join Date
    02-21-2009
    Location
    Atwood Lake in Mid NE Ohio...look it up.
    MS-Off Ver
    Excel 2010 2019
    Posts
    12,749

    Re: Help needed to change print code

    Hi Paul

    Don't know...can't test...post your file...I'll be glad to trouble shoot.

  7. #7
    Valued Forum Contributor
    Join Date
    06-30-2005
    Location
    Verwood, Dorset, England
    MS-Off Ver
    Excel 2000
    Posts
    479

    Re: Help needed to change print code

    Hi jaslake

    File attached as requested

    Paul

    Targets.xlsm

  8. #8
    Forum Expert jaslake's Avatar
    Join Date
    02-21-2009
    Location
    Atwood Lake in Mid NE Ohio...look it up.
    MS-Off Ver
    Excel 2010 2019
    Posts
    12,749

    Re: Help needed to change print code

    Hi Paul

    This works for me
    Please Login or Register  to view this content.

  9. #9
    Valued Forum Contributor
    Join Date
    06-30-2005
    Location
    Verwood, Dorset, England
    MS-Off Ver
    Excel 2000
    Posts
    479

    Re: Help needed to change print code

    Hi Jaslake

    Thanks for your help, however your code does the same as my original code, which probably means I didn't explain it very well

    I've been playing around with the code and if I change this bit
    Please Login or Register  to view this content.
    to be
    Please Login or Register  to view this content.
    , it does what I want. However this piece of code is not dynamic and If I add rows will not print out everything I want.

    So my question now is what code do I need to find the first blank cell in Column A after row 4, currently that would be row 14

    Thanks

    Paul

  10. #10
    Forum Expert jaslake's Avatar
    Join Date
    02-21-2009
    Location
    Atwood Lake in Mid NE Ohio...look it up.
    MS-Off Ver
    Excel 2010 2019
    Posts
    12,749

    Re: Help needed to change print code

    Hi Paul

    Try
    Please Login or Register  to view this content.

  11. #11
    Valued Forum Contributor
    Join Date
    06-30-2005
    Location
    Verwood, Dorset, England
    MS-Off Ver
    Excel 2000
    Posts
    479

    Re: Help needed to change print code

    Hi jaslake

    Thx, for your patience and endeavour, that works

    Paul

  12. #12
    Forum Expert jaslake's Avatar
    Join Date
    02-21-2009
    Location
    Atwood Lake in Mid NE Ohio...look it up.
    MS-Off Ver
    Excel 2010 2019
    Posts
    12,749

    Re: Help needed to change print code

    You're welcome...glad I could 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. Code for Worksheet Change Event Needed
    By ARGK in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 06-17-2013, 11:54 PM
  2. VBA Code to Change Length and width of Print Area
    By rlsublime in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 01-05-2012, 11:39 AM
  3. code to change row values a little help needed
    By hattisaeed in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 08-30-2011, 06:37 AM
  4. change code from print to paste sheet
    By tinkerbelle in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 05-30-2011, 05:50 AM
  5. Code needed to print multiple workbooks
    By madbloke in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 08-05-2005, 11:05 AM

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