• Home
  • About Me
  • Tutorials
  • Projects
  • Register
  • Login
  1. Home
  2. Tutorials
  3. Dictionary in VBA
    Python Basics
    Python
    How to send Emails
    How to round up in Python
    Python Scientific Libraries
    Django
    how to add settings file to gitignore with django
    Numpy
    1. Numpy Introduction
    2. Matrix Multiplications and Operations
    3. Min, Max and Norm of Matrices
    Pandas
    Pandas - Tips and Tricks
    Pandas Best Practices
    How to get total number of minutes or hours from timedelta in Pandas?
    How to convert pyodbc crsr to Pandas DataFrame
    Pandas- How do I do vlookup in Python
    Pandas-Introductions to DataFrame(tables) and Series(Columns) in Pandas
    Pandas - How do I filter my data in Pandas?
    Pandas- How to create Pivot tables ?
    Pandas- How do I group my data in Pandas ?
    Pandas - How to rename Column names ?
    Pandas - How do I change the position of my column ?
    Pandas - How do i delete a column ?
    Pandas - How to deal with Date, Time in your data?
    Pandas- How do I find/delete duplicated rows ?
    Pandas - How do I find/fill/delete missing values ?
    Pandas - How to add a new column to your table
    Pandas- How do I select columns ?
    Pandas - How do I use If() Statement for my columns ?
    Pandas -How to work with dates?
    How to read Access Database with Python
    How to read SQL Server from Python
    Pandas- How do I get unique values of my Column/Table ?
    Pandas - How to read a CSV file in Pandas?
    Pandas- How do I read Json file into Python
    Pandas- How do I read and Save Excel files with Pandas
    Machine Learning
    MachineLearning Introduction
    2-The Perceptron Algorithm
    10- Supervised vs Unsupervised Introduction
    11- Linear Regression
    SQL
    SQL
    How to pivot in SQL?
    Aggregate function - Average(Mean)
    Aggregate Function - Sum() Total
    Aggregate Function - Max and Min
    Excel
    Excel
    VBA - How to let User select a file
    VBA - SQL Connection + Pivot tables
    VBA - END To END Report 1
    VBA - Sorting Data
    VBA - Formatting Date and Time
    VBA - Conditional Formatting
    VBA - Let user choose a saving location
    VBA - End to End Report 2
    VBA - End to End Report 3
    VBA - Vlookups and file comparison
    Dictionary in VBA
    VBA - How to use checkbox to run a macro?
    Javascript
    Javascript
    Javascript forEach and map array methods
    How to use Fetch function in Javascript
    Trading
    trade
    Trading
    Bit Coin
    bitcoin
    bitcoin
    PyTorch
    pytorch
    PyTorch - Tensors
    Linux
    Linux
    How to see manually installed packages
    1- Commands History
    2-Search your commands
    3- How to unzip a file in Linux
    4-How to view the content of a file
    5- How to count words in Ubuntu
    6- How to compares files in Ubuntu
    7-How to view the manual of a command
    8-How to remove all files recursively by force
    9-How to exist a command
    10-sort command
    11- basic Calculator
    11-Opening a file in full screen mode
    12-Opening a file in full screen mode
    13- How to print current directory
    14- Changing directory
    15-Moving file
    16-Copying files
    17- Creating a folder/directory
    18- Deleting directory/folder
    19- Deleting Files(s)
    20-showing all/specific files in a directory
    21- Globbing for patterns in files
    22- $PATH folder
    23- Updating and Installing packages
    24- Working with users
    25-SSH
    26-File Permissions
    How to see windows directory in git bash
    How to see Ubuntu memory
    How to delete multiple lines in nano editor?
    How to see windows files in ubuntu installed on windows?
    How to remove files from current directory not recursive
    Ubuntu
    How to see manually installed packages
    1- Commands History
    2-Search your commands
    3- How to unzip a file in Linux
    4-How to view the content of a file
    5- How to count words in Ubuntu
    6- How to compares files in Ubuntu
    7-How to view the manual of a command
    8-How to remove all files recursively by force
    9-How to exist a command
    10-sort command
    11- basic Calculator
    11-Opening a file in full screen mode
    12-Opening a file in full screen mode
    13- How to print current directory
    14- Changing directory
    15-Moving file
    16-Copying files
    17- Creating a folder/directory
    18- Deleting directory/folder
    19- Deleting Files(s)
    20-showing all/specific files in a directory
    21- Globbing for patterns in files
    22- $PATH folder
    23- Updating and Installing packages
    24- Working with users
    25-SSH
    26-File Permissions
    How to see windows directory in git bash
    How to see Ubuntu memory
    How to delete multiple lines in nano editor?
    How to see windows files in ubuntu installed on windows?
    How to remove files from current directory not recursive
    Flutter
Function Params
Early binding reference “Microsoft Scripting Runtime”
(Add using Tools->References from the VB menu)
Declare (early binding) Dim dict As Scripting.Dictionary
Create(early binding) Set dict = New Scripting.Dictionary
Declare (late binding) Dim dict As Object
Create(late binding) Set dict = CreateObject("Scripting.Dictionary")
Add item (key must not already exist) dict.Add Key, Value
e.g. dict.Add "Apples", 50
Change value at key. Automatically adds if the key does not exist. dict(Key) = Value
e.g. dict("Oranges") = 60
Get a value from the dictionary using the key Value = dict(Key)
e.g. appleCount = dict("Apples")
Check if key exists dict.Exists(Key)
e.g. If dict.Exists("Apples") Then
Remove item dict.Remove Key
e.g. dict.Remove "Apples"
Remove all items dict.RemoveAll
Go through all items (for each loop) Dim key As Variant
For Each key In dict.Keys
    Debug.Print key, dict(key)
Next key
Go through all items (for loop - early binding only) Dim i As Long
For i = 0 To dict.Count - 1
   Debug.Print dict.Keys(i),      dict.Items(i)
Next i
Get the number of items dict.Count
Make key case sensitive (the dictionary must be empty). dict.CompareMode = vbBinaryCompare
Make key non case sensitive (the dictionary must be empty). dict.CompareMode = vbTextCompare
Copyright © MK-Analaysis Solutions