我对 VBA 相当陌生,并且正在尝试在表格的每一列中添加一个箭头。我收到错误:method 'range' of object '_global' failed
。
我应该怎么做才能修复它。
Sub loop1()
'Loop round range P6:AA10
Dim i As Integer
Dim j As Integer
Dim k As Integer
For i = 9 To 14
For j = 6 To 10
k = (i * 2) - 1
ActiveSheet.Shapes.AddShape(msoShapeRightArrow, Range(Cells(j, k)).Left + 2, _
Range(Cells(j, k)).Top + 3, 15, 10).Select
Next j
Next i
End Sub