+ Reply to Thread
Results 1 to 5 of 5

Multiple Range issue

  1. #1
    Forum Contributor
    Join Date
    12-07-2012
    Location
    Netherlands
    MS-Off Ver
    Excel 2021
    Posts
    126

    Multiple Range issue

    I am struggling for some hours already..

    In the immediate window this works:

    Please Login or Register  to view this content.
    But this doesn't (error 1004):
    Please Login or Register  to view this content.

    What am I not seeing here?
    Thx...
    Last edited by ArnolddG; 03-07-2019 at 06:56 PM.

  2. #2
    Valued Forum Contributor
    Join Date
    01-07-2013
    Location
    Michigan
    MS-Off Ver
    O365
    Posts
    601

    Re: Multiple Range issue

    Not sure what to tell you, both work for me on one of my workbooks. Are you placing a ? at the start of the line in the immediate window?

  3. #3
    Forum Contributor
    Join Date
    12-07-2012
    Location
    Netherlands
    MS-Off Ver
    Excel 2021
    Posts
    126

    Re: Multiple Range issue

    Yes I did (I edited the post)
    It seems to work fine after I have quit and opened Excel (2010).
    The actual code should be this:
    Please Login or Register  to view this content.
    After I run this (in a module or the immediate window) the error 1004 pops up until I reset Excel again(!)
    Could there be a maximum to concatenate ranges that Excel 2010 cannot deal with?
    Last edited by ArnolddG; 03-07-2019 at 08:26 PM.

  4. #4
    Valued Forum Contributor
    Join Date
    01-07-2013
    Location
    Michigan
    MS-Off Ver
    O365
    Posts
    601

    Re: Multiple Range issue

    This works for me in a macro enabled workbook. Unfortunately, I cannot test in Excel 2010:
    Please Login or Register  to view this content.
    Not sure what the issue might be. There's a limit of 255 characters, if I remember correctly, but you haven't hit that.
    Last edited by Melvosh; 03-08-2019 at 09:06 AM.

  5. #5
    Forum Contributor
    Join Date
    12-07-2012
    Location
    Netherlands
    MS-Off Ver
    Excel 2021
    Posts
    126

    Re: Multiple Range issue

    I found out that when I use this in a normal module everything is OK, but when I use the code in the ThisWorkbook Object (Private Sub Workbook_BeforePrint(Cancel As Boolean)), then I cannot use the range.
    So my solution was to make a separate sub in a module and call that sub.
    Problem solved!
    Thanks for your input...

+ 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. [SOLVED] Index, Small, Row issue with Multiple Values and need Multiple Results
    By jmantn in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 11-13-2014, 05:17 PM
  2. Replies: 13
    Last Post: 12-19-2013, 11:06 PM
  3. [SOLVED] Issue with Sorting a Range: Sort method of Range class failed
    By helpmeinexcel in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 04-12-2013, 01:51 PM
  4. Range Sum issue
    By a2excel in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 07-10-2012, 10:44 AM
  5. Replies: 0
    Last Post: 06-19-2012, 05:15 PM
  6. Range Issue
    By JayWeb in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 01-24-2010, 08:05 AM
  7. Issue copying multicell range to destination workbook range
    By kuraitori in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 12-24-2008, 02:48 PM
  8. Range issue...
    By James in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 08-04-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