+ Reply to Thread
Results 1 to 7 of 7

Need help with associating multiple items to a single key for VBA dictionary.

  1. #1
    Registered User
    Join Date
    11-05-2018
    Location
    Montreal
    MS-Off Ver
    2016
    Posts
    7

    Need help with associating multiple items to a single key for VBA dictionary.

    Hi guys,

    As the title says I need help to associate 2 or more items for a single key.
    As an example, I would like to have both "event1" & "event2" to be associated with the date CDate("01/01/19").
    My code is as per below, any help is appreciated


    Please Login or Register  to view this content.

  2. #2
    Forum Guru
    Join Date
    09-10-2017
    Location
    Chippenham, England
    MS-Off Ver
    365
    Posts
    15,029

    Re: Need help with associating multiple items to a single key for VBA dictionary.

    Like
    Please Login or Register  to view this content.

  3. #3
    Registered User
    Join Date
    11-05-2018
    Location
    Montreal
    MS-Off Ver
    2016
    Posts
    7

    Re: Need help with associating multiple items to a single key for VBA dictionary.

    Hi Fluff13,

    Thanks!, However, I seem to run into an error when running my code with this edit specifically at this line of code:

    Please Login or Register  to view this content.
    Any possible fix ?

  4. #4
    Forum Guru
    Join Date
    09-10-2017
    Location
    Chippenham, England
    MS-Off Ver
    365
    Posts
    15,029

    Re: Need help with associating multiple items to a single key for VBA dictionary.

    It needs to be
    Please Login or Register  to view this content.
    If you want the first event or use (1) for the second event

  5. #5
    Forum Expert Arkadi's Avatar
    Join Date
    02-13-2014
    Location
    Smiths Falls, Ontario, Canada
    MS-Off Ver
    Office 365
    Posts
    5,057

    Re: Need help with associating multiple items to a single key for VBA dictionary.

    Depending on whether there are always 2 events, you may have to make it dynamic for checking each array element within the key... something like

    Please Login or Register  to view this content.
    Please help by:

    Marking threads as closed once your issue is resolved. How? The Thread Tools at the top
    Any reputation (*) points appreciated. Not just by me, but by all those helping, so if you found someone's input useful, please take a second to click the * at the bottom left to let them know

    There are 10 kinds of people in this world... those who understand binary, and those who don't.

  6. #6
    Registered User
    Join Date
    11-05-2018
    Location
    Montreal
    MS-Off Ver
    2016
    Posts
    7

    Re: Need help with associating multiple items to a single key for VBA dictionary.

    Quote Originally Posted by Arkadi View Post
    Depending on whether there are always 2 events, you may have to make it dynamic for checking each array element within the key... something like

    Please Login or Register  to view this content.
    Thanks!! That was exactly what I was looking for.

  7. #7
    Forum Expert Arkadi's Avatar
    Join Date
    02-13-2014
    Location
    Smiths Falls, Ontario, Canada
    MS-Off Ver
    Office 365
    Posts
    5,057
    Glad I could add something
    Fluff did all the work, I just saw a chance for a tiny contribution.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Add 2 items into dictionary
    By jaryszek in forum Excel Programming / VBA / Macros
    Replies: 11
    Last Post: 06-15-2018, 11:58 AM
  2. [SOLVED] Seeing if multiple items in a dictionary exist...
    By swade730 in forum Excel Programming / VBA / Macros
    Replies: 11
    Last Post: 05-18-2017, 06:43 AM
  3. [SOLVED] Retrive multiple items from dictionary
    By jaryszek in forum Excel General
    Replies: 34
    Last Post: 02-24-2017, 07:52 AM
  4. [SOLVED] Looping through dictionary items where items are an array
    By strud in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 11-19-2014, 06:56 AM
  5. Single to multiple items formula
    By werko in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 07-13-2014, 06:00 AM
  6. [SOLVED] Referencing multiple dic.items in dictionary to clean up my code
    By strud in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 10-15-2013, 07:58 AM
  7. [SOLVED] Add multiple items to scripting dictionary from one key and keep structure
    By strud in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 10-07-2013, 09:44 AM

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1