Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

second dictionary object is empty. #37

Open
hammrxu opened this issue Aug 14, 2022 · 2 comments
Open

second dictionary object is empty. #37

hammrxu opened this issue Aug 14, 2022 · 2 comments

Comments

@hammrxu
Copy link

hammrxu commented Aug 14, 2022

I have two dictoinary object, mydict and mydict2. I have customer email and customer address to store, mydict stores email as key, address as value. mydict2 store address as key, email as value when mydict.exist(a record). I look at locals window. the records are well store inside mydict and mydict2. and it is accessible for mydict, but not for mydict2.

when i debug mydict with debug.print

   Debug.Print "email : " & mydict2(Key)
   Debug.Print "address : " & Key
next key```

output:
```email : 
address : ```

@hammrxu
Copy link
Author

hammrxu commented Aug 14, 2022

i write two objects inside one subroutine

@Nick-vanGemeren
Copy link

Your second Print shows thatKeyis blank or empty. So no surprise that there is no email.

The Locals window will only show you keys. You can use VBA-JSON to get a dump of your dictionaries:

   Debug.Print "mydict : ";  JsonConverter.ConvertToJson(mydict,2)

Some of your posted code may have been lost: 3-backticks should be on their own line. Please post the creation and debugging code.

If you have already solved your problem, please close this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants