+ Reply to Thread
Results 1 to 4 of 4

Trying to combine print areas

  1. #1
    Registered User
    Join Date
    10-22-2014
    Location
    Hyde, Manchester
    MS-Off Ver
    2010
    Posts
    79

    Trying to combine print areas

    Good Afternoon guys,

    I am trying to sort an excel report so that it only selects certain print areas according to values in different cells. To do this I am applying the different print areas to variables and then will combine all of those into a print command. However, when I select the first print area, which is set in a variable it works but adding the second variable with an "&" symbol causes a runtime 1004 error. The next problem is that the runtime 1004 error is not a regular one it shows up as the error that you normally get in excel when a formula is not correct (see attached picture).
    Please Login or Register  to view this content.
    scrnshot.jpg

    Any help as to what that error code means in that form would be greatly appreciated!

    Regards

    Tom

  2. #2
    Forum Expert Greg M's Avatar
    Join Date
    08-16-2007
    Location
    Dublin. Ireland
    MS-Off Ver
    Office 2016
    Posts
    4,481

    Re: Trying to combine print areas

    Hi there,

    Try using the following code:

    Please Login or Register  to view this content.

    Hope this helps - please let me know how you get on.

    Regards,

    Greg M

  3. #3
    Registered User
    Join Date
    10-22-2014
    Location
    Hyde, Manchester
    MS-Off Ver
    2010
    Posts
    79

    Re: Trying to combine print areas

    Perfect, thats done the trick thanks!

    Tom

  4. #4
    Forum Expert Greg M's Avatar
    Join Date
    08-16-2007
    Location
    Dublin. Ireland
    MS-Off Ver
    Office 2016
    Posts
    4,481

    Re: Trying to combine print areas

    Hi Tom,

    Many thanks for your prompt feedback - glad I was able to help.

    Regards,

    Greg M

+ 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. Macro to print multiple print areas on one page.
    By morangeman in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 02-23-2015, 12:13 PM
  2. Create buttons to print defined print areas
    By nwpassage in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 02-04-2015, 11:17 PM
  3. Print selected Print Areas to a PDF
    By Santanae in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 02-22-2013, 10:42 AM
  4. VBA code to print several print areas in one worksheet
    By ABSTRAKTUS in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 11-25-2010, 03:24 PM
  5. How to print multiple print areas on the same page.
    By Dalilah in forum Excel General
    Replies: 5
    Last Post: 08-27-2008, 09:05 AM
  6. print areas
    By miiia83 in forum Excel General
    Replies: 2
    Last Post: 07-01-2008, 09:59 AM
  7. printing multiple print areas with a print dialog box
    By LHaro in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 08-17-2005, 05:05 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