Demonstration script that deletes all the key-item pairs from a Script Runtime Dictionary. Script must be run on the local computer
Set oDictionary = CreateObject("Scripting.Dictionary")
oDictionary.Add "Printer 1", "Printing"
oDictionary.Add "Printer 2", "Offline"
oDictionary.Add "Printer 3", "Printing"
keysCol = oDictionary.Keys
Print "First run: "
For Each KeyStr in keysCol
Print KeyStr
Next
oDictionary.RemoveAll
keysCol = oDictionary.Keys
Print "Second run: "
For Each KeyStr in keysCol
Print KeyStr
Next
Posted in Dictionary Objects



daniva




Recent Comments