+ Reply to Thread
Results 1 to 5 of 5

connecting macros

  1. #1
    Registered User
    Join Date
    04-15-2009
    Location
    morristown, ny
    MS-Off Ver
    Excel 2007
    Posts
    39

    connecting macros

    JBeaucaire help me with the following code. It works great, I have 14 ranges like this on the same spreadsheet and would like to print all of them based on the result in the target cells for the range of each to print.

    I currently have a macro button to print each range as you can see. Is it possible to connect these? What I have tried is cutting the End Sub and then the Dim r As Long but get errors.


    Please Login or Register  to view this content.
    Last edited by ed ayers315; 11-09-2009 at 03:47 PM.

  2. #2
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: connecting macros

    Hi again Ed. Be sure to read through the Forum Rules so you can use and follow them effectively. For instance, you'll need to edit that post above and put code tags around that code you used. (Like I did below...)

    Please Login or Register  to view this content.
    _________________
    Microsoft MVP 2010 - Excel
    Visit: Jerry Beaucaire's Excel Files & Macros

    If you've been given good help, use the icon below to give reputation feedback, it is appreciated.
    Always put your code between code tags. [CODE] your code here [/CODE]

    ?None of us is as good as all of us? - Ray Kroc
    ?Actually, I *am* a rocket scientist.? - JB (little ones count!)

  3. #3
    Registered User
    Join Date
    04-15-2009
    Location
    morristown, ny
    MS-Off Ver
    Excel 2007
    Posts
    39

    Re: connecting macros

    Sorry about the code brackets.

    I plugged in your code; trouble with ranges that did not have a target number, the code error'd there.

    Is there a way to jump to the next routine if an error is found?

  4. #4
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: connecting macros

    You're saying some of the cells might be blank that are supposed to determine how many rows to copy? You'll have to build that test into each section then:

    Please Login or Register  to view this content.

  5. #5
    Registered User
    Join Date
    04-15-2009
    Location
    morristown, ny
    MS-Off Ver
    Excel 2007
    Posts
    39

    Thumbs up Re: connecting macros

    Thanks JB it works great!!!

    Put another in the Solved Column
    Last edited by ed ayers315; 11-09-2009 at 03:44 PM. Reason: Solved

+ 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