excel vba
Microsoft Office Training verified by visa - mastercard securecode about microsoft training company london ukadd this page to your favourites/bookmarksAdd to favourites
view a printable version of this pagePrintable version
email this page to somebodyEmail this page
Customer: Sign in
Delegate: Sign in
Trainer: Log in

Forum home » Delegate support and help forum » Microsoft Excel Training and help » Excel VBA

Excel VBA

The UK's most regular instructor-led training courses.
Training information: excel computer course london · Excel course london · Microsoft Excel Training London
See also · excel-courses-london · excel courses in london · excel microsoft training

resolvedResolved · Low Priority · Version Standard

Excel VBA

Daniel has attended:
Excel VBA course

by - delegate Daniel [1 post] (2008 Feb 14 Thu, 16:31) replyReply

What is the difference between a "Dictionary" and a "Collection"?
Also how can I create mine and initialise variables (or objects) held within them?

Excel Intermediate 1 day course
Version Date Location Places
available
Book Next place rate:
Card Invoice
2007 2008 Jul 8 Tue Bloomsbury 0 FULL    
2003/XP 2008 Jul 8 Tue Bayswater 1 book now £195 £205
2003/XP 2008 Jul 9 Wed Bloomsbury 3 book now £210 £215
2003/XP 2008 Jul 15 Tue Bloomsbury 3 book now £210 £215
2003/XP 2008 Jul 15 Tue Tooting 0 FULL    
2007 2008 Jul 16 Wed Bloomsbury 7 book now £202 £224
Full Schedule: See all 160 Excel Intermediate course dates.
Bookings currently available until 25th November 2009.

RE: Excel VBA

by - trainer Rich platinum contributer[654 posts] (2008 Apr 4 Fri, 10:07) Edited on 2008 Apr 4 Fri, 10:08 replyReply

Hi Daniel.

"The Dictionary object is a data structure that can contain sets of pairs, where each pair consists of an item, which can be any data type, and a key, which is a unique String value that identifies the item. The Dictionary object is similar in some ways to the VBA Collection object; however, the Dictionary object offers certain features that the Collection object lacks, including:

The Exists method. You can use this method to determine whether a particular key, and its corresponding item, exist in a Dictionary object. The Exists method makes it simpler and more efficient to search a Dictionary object than to search a Collection object.

The CompareMode property. Setting this property specifies the text-comparison mode for the Dictionary object, so that you can search for a key in either a case-sensitive or case-insensitive manner. By default, it's set to BinaryCompare, which means that the Exists method will return True only if it finds a binary match. There's no way to specify a text-comparison mode for a key that retrieves an item from a Collection object.

The Key property. This property enables you to return the key for a particular item in the dictionary. An item in a Collection object also has a key, which you can use to retrieve that item; however, there's no way to retrieve the key itself.

The RemoveAll method. This method removes all items in the Dictionary object. A Collection object, on the other hand, has no method for removing all items at once, although setting the Collection object to Nothing has the same effect.

The primary advantage of the Dictionary object over the Collection object is the fact that it's easier to search a Dictionary object for a given item. Despite this advantage, the Dictionary object does not entirely replace the Collection object. The Collection object is useful in some situations where the Dictionary object is not. For example, if you're creating a custom object model, you can use a Collection object to store a reference to a custom collection, but you can't use a Dictionary object to do this."

Source:
http://visualbasic.ittoolbox.com/documents/popular-q-and-a/dictionary-object-vs-collection-object-1397

I hope this helps.

Regards, Rich


Related articles

· Advanced Excel Training - takes you to the next level
· Microsoft Excel Training: Essential for Today's Employees
· 3 Reasons why Your Small Business Office Needs Microsoft Excel Training
· Excel Macros for the Non-Programmer
· How to Create Better Excel Spreadsheets: Part Four

Please browse our web site to find out more about
excel computer course london and other Microsoft training courses.

Excel tip:

Large Icons on toolbar

You can make the buttons on your toolbars bigger by going to Tools / Customize / Options / select Large icons.

View all Excel hints and tips

Institute of IT Training - Accredited Training Provider Institute of IT Training - Accredited Training Provider Prodigy Platinum Learning Partner Microsoft Office Specialist Authorised Testing Centre

Microsoft Registered Partner
microsoft office
ms office project server

Association of Computer Trainers Valid HTML 4.01 Transitional
Valid CSS Markup

secure online payments - visa - mastercard

Mini sitemap. These are the main areas of our web site. Full sitemap.

Training by application Main information pages See also

Access courses
DreamWeaver courses
Excel courses
MS Project courses
Outlook courses
PowerPoint courses
VBA courses
Word courses
(more...)

Public scheduled courses
On-site training
Closed company courses

Microsoft Office training
Pricing and availability
Training schedule
Training venues

Access training
Dreamweaver training
Excel training
MS Project training
PowerPoint training

London Computer Training
Computer Training London

Microsoft Access training
Microsoft Excel training
Microsoft Project training
Microsoft Outlook training
Microsoft Powerpoint training
Microsoft Word training

Time Management Course London

Interested in Access training? Please see the following pages:
microsoft access courses · microsoft training access course
microsoft+access+training · access courses in london

Training Information
AddThis Social Bookmark Button What's this?
Add to Del.icio.us Add to Facebook Add to Digg Add to Reddit Add to Google Add to Yahoo Add to Diigo Add to Mr. Wong Add to Linkarena Add to Power Oldie Add to Folkd Add to Jumptags Add to Upchuckr Add to Simpy Add to StumbleUpon Add to Slashdot Add to Netscape Add to Furl Add to Spurl Add to Blinklist Add to Blogmarks Add to Technorati Add to Newsvine Add to Blinkbits Add to Ma.Gnolia Add to Smarking Add to Netvouz