Step 12: Go to View menu and select Watch Window and Immediate Window as shown in the below list.Īfter that our VBA window will probably look like as shown below. Now to understand how words will be added into Excel VBA Dictionary, we need to add some more watch windows. Step 11: Now insert Debug.Print command to print the values stored in used keys as per numbers fed. Let’s say those words be “ Cat” and “ Rat” with Key 12 and 13 respectively. Step 10: Similarly, we add a few more words. Step 9: Now we will assign an Item to that Key. Here we have randomly taken the key as 11. Add which is used for adding the words in the dictionary with any Key as shown below. Step 8: As we already discussed the different properties or applications which we can choose in Excel VBA Dictionary. Step 7: Now we will open the With-End with Loop as shown below. Step 6: Now set that variable Dictionary as New Dictionary as shown below. To avoid confusion, you can choose any other name as per your choice. Step 5: Now we will define a variable as Dictionary and assign it the function Dictionary as shown below. Step 4: Now write the subprocedure for VBA Dictionary in any name as shown below. So open a Module from Insert menu option as shown below. Step 3: Now we need a module to write the code for VBA dictionary.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |