LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
BW BW is offline
external usenet poster
 
Posts: 49
Default Can't trap error when checking for keys not in Collection

Hello,

For some reason when i try to remove a key from a Collection where that key
hasn't been added yet, i cannot trap the error when it occurs within an error
handler. All i get is a error dialog box that pops up that says "Invalid
procedure call or argument"

the code snippet is as follows:

On Error GoTo ERR_HANDLER
myCollection.Remove ("key1")
..
..
..
ERR_HANDLER:
..code here does not get executed when "key1" does not exist in myCollection.

How i can trap this error and continue processing?
 
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
Checking Options in UserForms Collection monir Excel Programming 17 May 14th 05 04:40 PM
Trap whether it was TAB or arrow keys etc HotRod Excel Programming 3 April 29th 05 07:23 PM
Error Trap TEB2 Excel Programming 2 March 15th 05 05:34 PM
Collection Object Keys Todd Huttenstine Excel Programming 10 October 29th 04 01:14 PM


All times are GMT +1. The time now is 03:30 AM.

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"