VBA-tools / VBA-Dictionary

Drop-in replacement for Scripting.Dictionary on Mac
MIT License
348 stars 89 forks source link

Empty .Items returns array of type Variant/String #26

Open omegastripes opened 4 years ago

omegastripes commented 4 years ago

Empty Scripting.Dictionary .Items returns empty array of type Variant/Variant in VBA, I use the array later to ReDim Preserve it and assign objects to it's elements. Empty VBA-Dictionary .Items returns empty array of type Variant/String, it makes impossible to assign an object to it after ReDim.

nectorprime commented 4 years ago

Hi

You do not need to redim anything here , just create a query (Recordset) and assign some dictionaries and collections depending to the structure of Json.

Managing Partner

Ca Premier Accounting Package Developer - Zambia Nector Prime Accounting Solutions Findeco House 7th Floor Room 8 Cairo Road

Lusaka, Zambia

Nector Prime Accounting Solution is a legally independent firm of Chartered Accountants and does not accept any responsibility or liability for the actions or inaction on the part of any other individual unaffiliated firm or firms.

P Please do not print this e-mail unless absolutely necessary. Save our ENVIRONMENT.

This e-mail may contain privileged and confidential information. If you are not the intended recipient, you must not copy or distribute it. If you have received this e-mail in error, please notify the sender and delete the e-mail immediately. You should ensure that this e-mail and attachment is virus free. E-mail is not a 100% secure communication medium. We advise you understand this lack of security and take any necessary measures when emailing us. We reserve the right to read any email or attachment entering or leaving our systems from any source without prior notice. Information about Nector Prime Accounting Solutions can be found at our offices at Findeco House 7th Floor Room 8 or Call us on Cell No. +260977352401

On Mon, 28 Oct 2019 at 20:33, omegastripes notifications@github.com wrote:

Empty Scripting.Dictionary returns empty array of type Variant/Variant in VBA, I use the array later to ReDim Preserve it and assign objects to it's elements. Empty VBA-Dictionary .Items returns empty array of type Variant/String, it makes impossible to assign an object to it after ReDim.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/VBA-tools/VBA-Dictionary/issues/26?email_source=notifications&email_token=ALEEAHPJT3FR6ACJG2VZLUDQQ4V55A5CNFSM4JF6IW62YY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4HU3EBOQ, or unsubscribe https://github.com/notifications/unsubscribe-auth/ALEEAHIYS4LR6M5445KB5EDQQ4V55ANCNFSM4JF6IW6Q .

omegastripes commented 4 years ago

Hi, thanks for the reply,

As I wrote I do use ReDim with simple array in my VBA code, it is quite enough for my application, and it works as it should. So I don't want to use Recordsets etc.

It works with no issues with Scripting.Dictionary. Now I tried VBA-Dictionary and found some difference, that is why I reported here.

timhall commented 4 years ago

Hi @omegastripes, thanks for raising this issue. The goal is as close to 100% compatibility as I can get, so it’s definitely appreciated. I’ll take a look and see what I can find