' 以下是遍历字典 Dim objKeys, objItems, i objKeys = objDict.Keys objItems = objDict.Items For i = 0 To objDict.Count -1 WSH.Echo "Key=" & objKeys(i) &_ " AND Value=" & objItems(i) Next ' 判断指定的key是否存在 If objDict.Exists("b") Then WSH.Echo "Found it" Else WSH.Echo "Not Exists!" End If objDict.RemoveAll ' 清空字典内所有的key及其对应value Set objDict = Nothing