Results 1 to 5 of 5

Thread: any recommendation for best tutorial to learn scripting dictionary in VBA?

  1. #1
    Junior Member
    Join Date
    Nov 2017
    Posts
    21
    Rep Power
    0

    Lightbulb any recommendation for best tutorial to learn scripting dictionary in VBA?

    I am very much interested to learn use of scripting dictionary in VBA and use of Arrays in VBA for Excel.

    do you have any recommendation where should i start? blog, book, video tutorial.

    thanks.

  2. #2
    Member
    Join Date
    May 2013
    Posts
    31
    Rep Power
    0
    Seems like you have asked this in other forums.

    First, get the help file script56.chm. It will show properties and methods and examples. Get it in the 3rd link in Reference section. http://www.robvanderwoude.com/wshlinks.php

    Here is how I used it.
    Code:
    'Early Binding method requires Reference: MicroSoft Scripting Runtime, scrrun.dll
    Function UniqueArrayByDict(Array1d As Variant, Optional compareMethod As Integer = 0) As Variant
      Dim dic As Object 'Late Binding method - Requires no Reference
      Set dic = CreateObject("Scripting.Dictionary")  'Late or Early Binding method
      'Dim dic As Dictionary     'Early Binding method
      'Set dic = New Dictionary  'Early Binding Method
      Dim e As Variant
      dic.CompareMode = compareMethod
      'BinaryCompare=0
      'TextCompare=1
      'DatabaseCompare=2
      For Each e In Array1d
        If Not dic.Exists(e) Then dic.Add e, Nothing
      Next e
      UniqueArrayByDict = dic.Keys
    End Function

  3. #3

  4. #4
    Junior Member
    Join Date
    Nov 2017
    Posts
    21
    Rep Power
    0
    thank you kenneth

  5. #5
    Junior Member
    Join Date
    Nov 2017
    Posts
    21
    Rep Power
    0
    snb thanks a lot

Similar Threads

  1. Replies: 9
    Last Post: 11-27-2017, 03:04 PM
  2. Vba scripting dictionary help
    By bpascal123 in forum Excel Help
    Replies: 1
    Last Post: 07-14-2012, 10:52 AM
  3. Excel VBA Dictionary Object
    By Rajan_Verma in forum Rajan Verma's Corner
    Replies: 1
    Last Post: 05-13-2012, 10:01 PM
  4. Learn Excel and VBA - Useful Links
    By Excel Fox in forum Excel and VBA Tips and Tricks
    Replies: 0
    Last Post: 09-12-2011, 12:57 AM
  5. Self-Learn Excel VBA
    By Meghna in forum Excel Help
    Replies: 1
    Last Post: 08-02-2011, 12:54 AM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •