【連想配列】


Dim oPriceOfFruit As Object
Set oPriceOfFruit = CreateObject("Scripting.Dictionary")
 
'登録
oPriceOfFruit.Add "リンゴ", "100円"
oPriceOfFruit.Add "イチゴ", "400円"
oPriceOfFruit.Add "メロン", "1000円"
 
'存在確認
If oPriceOfFruit.Exists("リンゴ") Then
    Debug.Print "Exists!"
Else
    Debug.Print "Not Exists!"
End If
 
Set oPriceOfFruit = Nothing
 

最終更新:2015年03月04日 21:52