Sub Button53_Click()
Dim rowsvalue As Integer
Dim rowsnum As Integer
rowsvalue = Sheet1.Range("C38").Value
rowsnum = Math.Round(rowsvalue / 20, 1)
k = 0
For Counter = 16 To 46
Worksheets("Single L Angle").Cells("F", Counter).Value = rowsnum * k
k = k + 1
Next Counter
End Sub
我想不通,我正在尝试制作一个 VB 代码,该代码从单元格“C38”中获取值,将其除以 20,然后将这些值粘贴到单元格 F16 -> F36 中。到目前为止一切都很好,但是当涉及到:
Worksheets("Single L Angle").Cells("F", Counter).Value = rowsnum * k
我不断收到不匹配 13 错误。