Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9017155
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T04:11:38+00:00 2026-06-16T04:11:38+00:00

I a looking for an workaround related to dictionary objects items Dim a, d

  • 0

I a looking for an workaround related to dictionary objects items

Dim a, d 'Create some variables

 Set d = CreateObject("Scripting.Dictionary")

 d.Add "a", "Athens" 'is possible I know 

 d.Add "a", "Athens","India","Paris" ' Is this Possible  under same Key?

Description snapshot:(UPDATED)

  Manger ID            EMPID      EMPID     EMPID     EMPID ......

     11                12          10
     15                10 
     20                22          45        46
     40

How the above table can then be implemented using dictionary object? Give me some idea.

Thanks,

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-16T04:11:39+00:00Added an answer on June 16, 2026 at 4:11 am

    EDIT: Makes variable name more OPfriendly

    EDIT: Include a Scripting.Dictionary Reference for OP’s reading

    Sub t()
        Dim d
        Dim a
        a = Array("Athens", "India", "Paris")
        Set d = CreateObject("Scripting.Dictionary")
        d.Add "a", a
        MsgBox Join(d.Item("a"), ",")
    End Sub
    

    EDIT: to read values as in OP’s question into dictionary and retrieve the values

    Sub t()
        Dim d As Object
        Dim values
        Dim height As Long
        Dim item
        Dim width As Long
        Dim i As Long, j As Long
        Dim MANGERID
        Dim EMPIDs
        Dim EMPID
        With ActiveSheet
            height = .Cells(.Rows.Count, 1).End(xlUp).Row
            If height < 2 Then
                Exit Sub
            End If
            Set d = CreateObject("Scripting.Dictionary")
            For i = 2 To height
                width = .Cells(i, .Columns.Count).End(xlToLeft).Column
                if width > 1 then  'make sure have EMPID
                    ReDim values(1 To width - 1)
                    Key = .Cells(i, 1).Value
                    For j = 2 To width
                        values(j - 1) = .Cells(i, j).Value
                    Next j
                    d.Add Key, values
                end if
            Next i
    
            'displaying back the items in the dictionary
            For Each MANGERID In d.keys
                'value array
                EMPIDs = d.item(MANGERID)
                If TypeName(EMPIDs) = "Variant()" Then
                    For Each EMPID In EMPIDs
                        Debug.Print MANGERID & ":" & EMPID
                    Next EMPID
                End If
            Next MANGERID
    
            Set d = Nothing
        End With
    End Sub
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am looking for a workaround way to improvise -moz-element() using -vendor-canvas() to essentially
Looking at some assembly code for x86_64 on my Mac, I see the following
Looking at some of the code System.Linq I've come across some examples of Buffer<TSource>
I'm looking for a workaround or polyfill for the z-index bug described in this
(Note: See also the related question Can browsers react to Set-Cookie specified in headers
I'm looking for a workaround that would allow me to remove the background from
I'm looking for a workaround on passing parameters to a template-match. I'm aware this
I am looking for a way to compile some libraries which come ready to
I'm looking for a workaround to this Published Twitter API bug: http://code.google.com/p/twitter-api/issues/detail?id=214 When you
Here's a related topic . I'm looking for something slightly different, I'm printing out

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.