如何解决“编译错误:对象需要”的错误?

这是我第一次使用VBA。 对于以下代码片段:

Dim i As Integer Set i = 0 For Each v In dictDT.Keys Cells(10, 5 + i) = dictDT.Item(v) i = i + 1 Next 

我不断收到这个错误:

 Compile Error: Object Required 

我究竟做错了什么?

更改

 Set i = 0 

 i = 0 

只有对象需要Set关键字。 其他variablestypes不。