+ Reply to Thread
Results 1 to 7 of 7

method union of object _global failed

  1. #1
    Forum Contributor
    Join Date
    09-14-2012
    Location
    mumbai,india
    MS-Off Ver
    Excel 2003
    Posts
    367

    method union of object _global failed

    I was making a report. Some data in different sheet. Did you want to export them in csv data sheet. But it does show error "method union of object _global failed".


    Please Login or Register  to view this content.
    Attached Files Attached Files

  2. #2
    Forum Guru :) Sixthsense :)'s Avatar
    Join Date
    01-01-2012
    Location
    India>Tamilnadu>Chennai
    MS-Off Ver
    2003 To 2010
    Posts
    12,770

    Re: method union of object _global failed

    Since R1 and R2 are referring to different SHEETS ranges then how you can select different sheets ranges in one shot when only one sheet will be the activesheet?

    Why don't you do the copy paste process one by one like

    R1.copy

    R2.copy


    If your problem is solved, then please mark the thread as SOLVED>>Above your first post>>Thread Tools>>
    Mark your thread as Solved


    If the suggestion helps you, then Click *below to Add Reputation

  3. #3
    Forum Guru HaHoBe's Avatar
    Join Date
    02-19-2005
    Location
    Hamburg, Germany
    MS-Off Ver
    work: 2016 on Win10 (notebook), private: 2019 on Win10 (desktop), 2019 on Win11 (notebook)
    Posts
    8,197

    Re: method union of object _global failed

    Hi, sanju2323,

    AFAIR there is no chance to build a multi range for ranges on different sheets in one range (and it doesn´t matter if one of them be the ActiveSheet). Maybe use an Array to loop through the sheets and the ranges.

    Ciao,
    Holger
    Use Code-Tags for showing your code: [code] Your Code here [/code]
    Please mark your question Solved if there has been offered a solution that works fine for you

  4. #4
    Forum Guru :) Sixthsense :)'s Avatar
    Join Date
    01-01-2012
    Location
    India>Tamilnadu>Chennai
    MS-Off Ver
    2003 To 2010
    Posts
    12,770

    Re: method union of object _global failed

    Quote Originally Posted by HaHoBe View Post
    (and it doesn´t matter if one of them be the ActiveSheet)
    I think the above one is directed to me.

    If so, my statement should be read based on the below line of OP's code.

    Please Login or Register  to view this content.

  5. #5
    Forum Guru HaHoBe's Avatar
    Join Date
    02-19-2005
    Location
    Hamburg, Germany
    MS-Off Ver
    work: 2016 on Win10 (notebook), private: 2019 on Win10 (desktop), 2019 on Win11 (notebook)
    Posts
    8,197

    Re: method union of object _global failed

    Hi, ;) SixthSense ;)

    please give the code with your alteration a try for a RTE 1004 at code line
    Please Login or Register  to view this content.
    where the ranges still refer to different sheets. The workaround is to either build individual ranges or use an Array/Collection/String for the areas and copy these individually.

    Ciao,
    Holger

  6. #6
    Forum Guru :) Sixthsense :)'s Avatar
    Join Date
    01-01-2012
    Location
    India>Tamilnadu>Chennai
    MS-Off Ver
    2003 To 2010
    Posts
    12,770

    Re: method union of object _global failed

    Quote Originally Posted by HaHoBe View Post
    please give the code with your alteration a try for a RTE 1004 at code line. where the ranges still refer to different sheets. The workaround is to either build individual ranges or use an Array/Collection/String for the areas and copy these individually.
    Please refer Post #2

  7. #7
    Forum Contributor
    Join Date
    09-14-2012
    Location
    mumbai,india
    MS-Off Ver
    Excel 2003
    Posts
    367

    Re: method union of object _global failed

    Is there any easy way to report. will also export to csv or xls format.

+ 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] Method 'Range' of object '_Global' Failed
    By jsmilke in forum Excel Programming / VBA / Macros
    Replies: 13
    Last Post: 02-12-2014, 05:49 PM
  2. Method 'Range' of object'_Global' failed
    By arbulgazar in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 03-07-2013, 06:52 PM
  3. Method 'Range' of object'_Global' failed
    By arbulgazar in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 03-06-2013, 09:17 AM
  4. Method 'range' of object '_global' failed.
    By johnmerlino in forum Excel General
    Replies: 3
    Last Post: 02-25-2011, 03:07 PM
  5. Method Range of object '_Global' failed
    By maverick2005 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 08-25-2005, 10:05 AM

Tags for this Thread

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