我可以这样做吗?
For i = 1 To 127
Dim cell&i as Range
Next
因为我有很多细胞需要调暗。
答案 0 :(得分:1)
尝试使用数组:
Dim nCells As Long
Dim myCells() As Range 'store them in an array
nCells = 127
ReDim myCells(1 To nCells)
For i = 1 To nCells
Set myCells(i) = Range("A1").Offset(i,i) ' or whatever...
Next i
也许你应该向我们展示你想要达到的目标。这种模式看起来有点不寻常。