LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 599
Default Add Unique item to Collection

I was pretty sure I knew how collections worked, but why do I get a run time
error (457) with this macro? Doesn't the On Error Resume Next trap that
error? XL2000, Win98SE.

Sub test()

Dim theColl As New Collection

theColl.Add "me", "me"
On Error Resume Next
theColl.Add "me", "me"
On Error GoTo 0

End Sub

Thanks.

--
Dick Kusleika
MVP - Excel
www.dicks-clicks.com
Post all replies to the newsgroup.


 
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
To find rate of each item from item.xls and to copy price.xls pol Excel Discussion (Misc queries) 7 July 16th 09 12:49 AM
unique item remover doc Excel Discussion (Misc queries) 1 November 13th 07 06:49 PM
Adding Unique Items to a Collection WJ Excel Discussion (Misc queries) 2 June 12th 07 03:46 PM
Item numbers result in item description in next field in Excel Cheryl MM Excel Worksheet Functions 1 February 20th 07 03:51 PM
Removing an Item From a Collection Dan Gesshel Excel Programming 4 November 1st 03 01:12 PM


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

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

About Us

"It's about Microsoft Excel"