Используйте Option Explicit
и объявите все свои переменные.
Строка 0 не является допустимой строкой, поэтому измените ее на l oop.
Option Explicit
Sub test()
Dim RowDict As Scripting.Dictionary
Dim RowList() As Variant
Dim TotalRow As Long
Dim SourceWS As Worksheet
Dim i As Long
Set SourceWS = ThisWorkbook.Sheets(1)
TotalRow = SourceWS.Cells(SourceWS.Rows.Count, 1).End(xlUp).Row
ReDim RowList(0)
For i = 1 To TotalRow
Set RowDict = New Scripting.Dictionary
RowDict.Add Key:="Name", Item:=SourceWS.Cells(i, 3)
RowDict.Add Key:="ID", Item:=SourceWS.Cells(i, 4)
RowDict.Add Key:="Device", Item:=SourceWS.Cells(i, 1)
ReDim Preserve RowList(UBound(RowList) + 1)
Set RowList(UBound(RowList)) = RowDict ' added SET because dictionaries are objects
Next
End Sub
или, если вы пытаюсь получить предметы:
For i = 1 To TotalRow
Set RowDict = New Scripting.Dictionary
RowDict.Add Key:="Name", Item:=SourceWS.Cells(i, 3)
RowDict.Add Key:="ID", Item:=SourceWS.Cells(i, 4)
RowDict.Add Key:="Device", Item:=SourceWS.Cells(i, 1)
ReDim Preserve RowList(UBound(RowList) + 1)
Debug.Print RowDict.Items(0) ' shows the item being added in the debug window
RowList(UBound(RowList)) = RowDict.Items(0)
Next i