【VBA】Dictionaryのセット|CreateObject(“Scripting.Dictionary”)
作成日:2022-12-03
更新日:2025-10-03

Dictionaryをセットする
CreateObject(“Scripting.Dictionary”)を使う
Private Sub Test()
Dim dic As Object: Set dic = CreateObject("Scripting.Dictionary")
If Not dic.Exists(xx) Then 'キー(xx)がdicに存在しなければ
dic.Add xx, yy 'キー(xx)と要素(yy)を追加する
End If
End Sub関連記事
2022-12-03
編集後記:
この記事の内容がベストではないかもしれません。
記事一覧
-

[VBA]開いているかwith FullName 【VBA】ブックが開いているか判定|StrComp で FullNameを調べる -

[VBA]画像として貼り付けCopyPicture 【VBA】セル範囲を画像としてコピーする|CopyPicture -

[VBA]Merge1D Arrays 【VBA】一次元配列と一次元配列を結合する -

[VBA]SaveAs名前を付けて保存 【VBA】名前を付けて保存|SaveAs -

[VBA]Vertical Paste1D array 【VBA】一次元配列を縦方向にシートに貼り付け【範囲をリサイズする】 -

[VBA]Cutbefore after 【VBA】文字列から指定文字より前/後ろをカットする|InStrRev/Left$/Mid$