Re: How do I copy first consonant from a word into new cell
- From: "Rick Rothstein" <rick.newsNO.SPAM@xxxxxxxxxxxxxxxxxx>
- Date: Sun, 12 Jul 2009 23:48:29 -0400
Question: Is there a limit to the size of the key in a Collection
that might affect using this method?
I've never seen anything published about it, but the following code seems to indicate the limit is probably more than will have significance to you...
Sub TestCollectionKeyLimitSize()
Dim C As New Collection
C.Add "A", String(1000000, "X")
C.Add "B", String(1000000, "Y")
C.Add "C", String(1000000, "Z")
C.Add "D", String(1000000, "X")
End Sub
Here I am adding three elements to the collection named C using a key of one million characters each (X's, Y's and Z's). When I run the code, the debugger stops on the last item saying it is a duplicate key, so it appears to have accepted the one million characters long keys and is apparently using them correctly.
--
Rick (MVP - Excel)
"Ron Rosenfeld" <ronrosenfeld@xxxxxxxxxx> wrote in message news:6qgk55dh3e6va42e5n6c8mfb3deooo2vhe@xxxxxxxxxx
On Sun, 12 Jul 2009 14:21:47 -0400, "Rick Rothstein"
<rick.newsNO.SPAM@xxxxxxxxxxxxxxxxxx> wrote:
I don't dislike Regular Expressions (really, I don't), it is just that I
feel most people posting questions here are not all that familiar with them
and would be more comfortable with solutions coded using native VB
functions, operators, etc. I do feel your posting Regular Expression
solutions is important, though, both for those reading this thread now, and
those reading the thread later on in the archives, who are familiar with
them.
Well, I'll continue. But *I* have to remember that sometimes a native solution
is better. However, it's usually so much quicker to develop the solution using
Regex...
Speaking of native VB -- a question you might be able to answer. It has
nothing to do with Excel other than the solution is VBA.
I have been using Collections to detect duplicates. This seems like a simple
method because if you try to add a member with an already used key, an error
occurs.
I have a situation where I am getting duplicate notifications (from a gov't
website) of a particular event. Usually one original and three duplicates. I
have been fooling around with VBA and Outlook in an attempt to programmatically
remove the duplicates. The definitive property defining to me that this is a
duplicate is the message body. The message id's are different so I can't use
that.
Question: Is there a limit to the size of the key in a Collection that might
affect using this method?
--ron
.
- Follow-Ups:
- Re: How do I copy first consonant from a word into new cell
- From: Ron Rosenfeld
- Re: How do I copy first consonant from a word into new cell
- References:
- How do I copy first consonant from a word into new cell
- From: ozmann08
- Re: How do I copy first consonant from a word into new cell
- From: Ron Rosenfeld
- Re: How do I copy first consonant from a word into new cell
- From: Rick Rothstein
- Re: How do I copy first consonant from a word into new cell
- From: Ron Rosenfeld
- Re: How do I copy first consonant from a word into new cell
- From: Rick Rothstein
- Re: How do I copy first consonant from a word into new cell
- From: Ron Rosenfeld
- How do I copy first consonant from a word into new cell
- Prev by Date: Re: Entering an "IF" formula
- Next by Date: Re: Entering an "IF" formula
- Previous by thread: Re: How do I copy first consonant from a word into new cell
- Next by thread: Re: How do I copy first consonant from a word into new cell
- Index(es):
Relevant Pages
|