LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #11   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,071
Default union array

That example is beyond the scope of the code. As the only comment in the
code indicates it works strictly on 1D arrays.

Of course, one could easily argue that the definition of union in the
example you present is not (array("a", "b"), "c",1,"b",2,3) but rather
("a","b","c",1,2,3)

In any case...

What you want to do is in fact a subset of a larger class of possible data
sources: n-dimensional arrays or variants containing arrays of variants
containing arrays of...

While a solution can be created (I would use a recursive algorithm), it is
not included in this code. The code also doesn't explicitly handle objects,
either native or user-defined, or variables of a custom user type or....

Instead it relies on the default value, if any -- with the attendant and
potentially unintended consequences.

--
Regards,

Tushar Mehta
www.tushar-mehta.com
Excel, PowerPoint, and VBA add-ins, tutorials
Custom MS Office productivity solutions

In article . com,
says...
Hello Tushar,

what about
Sub testUnion()
Dim x, y, z, w
x = Array(Array("a", "b"), "c")
y = Array(1, "b")
z = Array(1, 2, 3)
w = VBAUnion(x, y, z)
?

I would expect w to be = Array(Array("a", "b"), "c",1,"b",2,3)
Right? But it is not.

Regards,
Bernd


 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Problems using Union All Peres-br-sp Excel Programming 2 October 21st 05 09:46 PM
Undo a Union Gary's Student Excel Programming 4 September 2nd 05 01:13 PM
union problem tom taol Excel Programming 2 February 1st 05 08:43 AM
how to union two array with same structure miao jie Excel Programming 2 October 13th 04 04:14 PM
Trouble with Union Ed Excel Programming 2 December 4th 03 07:30 PM


All times are GMT +1. The time now is 05:07 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"