Menu
-->
- Vba Add Reference
- Microsoft Scripting Runtime Excel 2016
- Excel Vba Add Microsoft Scripting Runtime Reference
- Microsoft Scripting Runtime Download
- Add Reference To Vba Project
Object that stores data key/item pairs.
Syntax
Scripting.Dictionary
Remarks
A Dictionary object is the equivalent of a PERL associative array. Items, which can be any form of data, are stored in the array. Each item is associated with a unique key. The key is used to retrieve an individual item and is usually an integer or a string, but can be anything except an array.
The following code illustrates how the FileSystemObject object is used to return a TextStream object that can be read from or written to: Set fs = CreateObject('Scripting.FileSystemObject') Set a = fs.CreateTextFile('c: testfile.txt', True) a.WriteLine('This is a test.' ) a.Close In the example code. FileSystemObject also called as FSO, provides an easy object based model to access computer’s file system. You simply have to create an instance of FileSystemObject in VBA and then you can generate files, read files, delete files, iterate though folders and do many other operations on your computer’s file system. The FileSystemObject is present inside the Microsoft Scripting Runtime. Jun 09, 2019 Start a new Standard EXE project in Visual Basic. Form1 is created by default. Click References on the Project menu and select the Microsoft Scripting Runtime. If the Microsoft Scripting Runtime does not appear in the list, browse for Scrrun.dll on your system. Install one of the tools listed previously if necessary.
Vba Add Reference
The following code illustrates how to create a Dictionary object.
Methods
Method | Description |
---|---|
Add | Adds a new key/item pair to a Dictionary object. |
Exists | Returns a Boolean value that indicates whether a specified key exists in the Dictionary object. |
Items | Returns an array of all the items in a Dictionary object. |
Keys | Returns an array of all the keys in a Dictionary object. |
Remove | Removes one specified key/item pair from the Dictionary object. |
RemoveAll | Removes all the key/item pairs in the Dictionary object. |
Properties
Microsoft Scripting Runtime Excel 2016
Property | Description |
---|---|
CompareMode | Sets or returns the comparison mode for comparing keys in a Dictionary object. |
Count | Returns the number of key/item pairs in a Dictionary object. |
Item | Sets or returns the value of an item in a Dictionary object. |
Key | Sets a new key value for an existing key value in a Dictionary object. |
Excel Vba Add Microsoft Scripting Runtime Reference
See also
Microsoft Scripting Runtime Download
Support and feedback
Add Reference To Vba Project
Have questions or feedback about Office VBA or this documentation? Please see Office VBA support and feedback for guidance about the ways you can receive support and provide feedback.