Re: How do I copy first consonant from a word into new cell

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



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

.



Relevant Pages

  • Re: Help with Array Usage
    ... Part of the solution to your problem will then be opening a file for reading. ... There are no numbers at all in the first column. ... How can I remove duplicate elements from a list or array? ... Part of the solution to your problem will then be appending ...
    (comp.lang.perl.misc)
  • Re: Problem in Win32Forth with open-file
    ... Win32Forth rev 6.10.04. ... I can open a file ok for reading, ... name is not a duplicate of an existing file and I can create the ... DOH! ...
    (comp.lang.forth)
  • Re: Problem in Win32Forth with open-file
    ... Win32Forth rev 6.10.04. ... I can open a file ok for reading, ... name is not a duplicate of an existing file and I can create the ... George Hubert ...
    (comp.lang.forth)
  • Re: Finding a duplicate entry with no end date
    ... It should work properly as per your specs, ie the error alert will pop up if ... the name entered is a duplicate, and if there is *no* end date (I've just ... Take a moment to press the "Yes" button from where you're reading this ...
    (microsoft.public.excel.misc)
  • Re: Import data selectively from a CSV larger than 65000 rows
    ... but would much rather do it with VBA if I ... e.g., ignore the import of a duplicate, or overwrite duplicates. ... If you need to use Excel for some reason, then set up a subset of the larger ... Does anyone have VBA code that would open a large csv file, ...
    (microsoft.public.excel.misc)