+ Reply to Thread
Results 1 to 11 of 11

Looking for online learning materials on arrays & scripting dictionaries

  1. #1
    Forum Contributor
    Join Date
    04-19-2013
    Location
    Yorkshire, England
    MS-Off Ver
    Excel 2010
    Posts
    297

    Looking for online learning materials on arrays & scripting dictionaries

    Helpful forum users have provided with me some useful codes using arrays and scripting dictionaries which I have been editing.

    However, they are becoming so useful that I think I should start looking into them in more detail.

    The materials I have found so far seem to assume quite a lot of previous knowledge- so resources that build up from the relative basics would be useful.

    Thanks guys

  2. #2
    Forum Expert
    Join Date
    03-28-2012
    Location
    TBA
    MS-Off Ver
    Office 365
    Posts
    12,454

    Re: Looking for online learning materials on arrays & scripting dictionaries

    Strud,
    Yes, that was the issue I faced when I begun searching for script material.
    scripting dictionaries are not part of excel. I have not come across a book which is specifically focus on script.
    I had to gather small pieces of info from different sources.
    The link is very good.
    http://www.experts-exchange.com/Soft...ss-in-VBA.html
    IMO, I had spent lots of time to understand dictionary without the solid grasp of arrays, was not good idea, but only with the wonderful world of "Hindsight!.
    Dictionary are sometimes referred by the name of "Associative Array" Which means the key is associate with the Item.
    There are many similarities and differences between dic and arrays, but the good starting point is "Arrays"
    Last edited by AB33; 10-11-2013 at 07:04 AM.

  3. #3
    Registered User
    Join Date
    08-30-2013
    Location
    Stockholm, Sweden
    MS-Off Ver
    Excel for Mac 2011
    Posts
    12

    Re: Looking for online learning materials on arrays & scripting dictionaries

    Hi strud: have you tried searching youtube? That helps me lot
    //Peter
    Quote Originally Posted by strud View Post
    Helpful forum users have provided with me some useful codes using arrays and scripting dictionaries which I have been editing.

    However, they are becoming so useful that I think I should start looking into them in more detail.

    The materials I have found so far seem to assume quite a lot of previous knowledge- so resources that build up from the relative basics would be useful.

    Thanks guys

  4. #4
    Forum Expert
    Join Date
    03-28-2012
    Location
    TBA
    MS-Off Ver
    Office 365
    Posts
    12,454

    Re: Looking for online learning materials on arrays & scripting dictionaries

    Peter,
    I have not seen any clip on dictionary. If you know one, please send us the link.

  5. #5
    Forum Contributor
    Join Date
    04-19-2013
    Location
    Yorkshire, England
    MS-Off Ver
    Excel 2010
    Posts
    297

    Re: Looking for online learning materials on arrays & scripting dictionaries

    I couldn't find anything on youtube about it either.

    Thanks AB33, the article you posted was fantastic for getting to grips with it.

    I keep finding that I can read an example or see some code and think I understand how that works (after some examination) but it is writing my own that becomes much more difficult.

    Just practice I guess. You were right as well it all comes back to arrays in this instance really.

  6. #6
    Forum Expert
    Join Date
    03-28-2012
    Location
    TBA
    MS-Off Ver
    Office 365
    Posts
    12,454

    Re: Looking for online learning materials on arrays & scripting dictionaries

    Yes, practice, practice and practice!

  7. #7
    Forum Contributor
    Join Date
    04-19-2013
    Location
    Yorkshire, England
    MS-Off Ver
    Excel 2010
    Posts
    297

    Re: Looking for online learning materials on arrays & scripting dictionaries

    related to that article AB33 I was wandering whether you might answer a question I have on an example in it....

    In example #4 in the article- the last bit of the code to write the dictionary items to the worksheet is:

    Please Login or Register  to view this content.
    I understand the first bit and how that deals with the keys. I am not 100% sure on how the bit dealing with the dic.Items works...specifically why it is
    Please Login or Register  to view this content.
    and how the following line works:

    Please Login or Register  to view this content.
    (I seem to remember you helped me with one of these codes before - but I may be wrong)
    Last edited by strud; 10-11-2013 at 07:19 AM.

  8. #8
    Forum Expert
    Join Date
    03-28-2012
    Location
    TBA
    MS-Off Ver
    Office 365
    Posts
    12,454

    Re: Looking for online learning materials on arrays & scripting dictionaries

    I do not know with out seeing the code with attached sheet, but I guess

    Keys = dic.Keys

    Loads the keys in to another variable "Keys".
    It is a word I would not use to load the keys array as it confuses the keys with another key.

    As the keys have lots of values (In an array), you need to loop through the array

    Please Login or Register  to view this content.
    It starts at 0 because keys are zero based arrays.

    Please Login or Register  to view this content.
    I am not entirely sure, but it may be you are loading(Copying) the items for each key.

  9. #9
    Forum Contributor
    Join Date
    04-19-2013
    Location
    Yorkshire, England
    MS-Off Ver
    Excel 2010
    Posts
    297

    Re: Looking for online learning materials on arrays & scripting dictionaries

    thanks for your help

    (btw the code as in the article that's why I didn't post it)

  10. #10
    Forum Guru Izandol's Avatar
    Join Date
    03-29-2012
    Location
    *
    MS-Off Ver
    Excel 20(03|10|13)
    Posts
    2,581

    Re: Looking for online learning materials on arrays & scripting dictionaries

    To retrieve an item you use this syntax:
    Please Login or Register  to view this content.
    Because the code has already stored the keys in an array, you can refer to that array for the keyname:
    Please Login or Register  to view this content.
    Actually this is not necessary when you output all keys and all items:
    Please Login or Register  to view this content.
    should be sufficient without looping.

  11. #11
    Forum Contributor
    Join Date
    04-19-2013
    Location
    Yorkshire, England
    MS-Off Ver
    Excel 2010
    Posts
    297

    Re: Looking for online learning materials on arrays & scripting dictionaries

    Thanks Izandol- yeah I was getting confused as to why a loop was used.

    Just tried your way without and that works great.

    Thanks for the help

+ 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. New to Excel Programming and looking for learning materials
    By joyofmanygenerations in forum Excel Programming / VBA / Macros
    Replies: 28
    Last Post: 07-15-2020, 07:45 AM
  2. Online learning materials
    By KELLIS in forum Excel - New Users/Basics
    Replies: 1
    Last Post: 08-07-2012, 01:59 PM
  3. Best resources/materials for learning VBA?
    By syrianrue in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 03-03-2012, 01:29 PM
  4. Looking for some simple Excel VBA learning materials
    By geoff_5956 in forum Excel - New Users/Basics
    Replies: 2
    Last Post: 06-09-2010, 07:54 AM
  5. [SOLVED] Learning VBA online for Excel
    By gandhi318 in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 01-02-2006, 02:10 PM

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