我一直在尝试解决这个问题,但无法解决。我有以下 VBA 代码。运行时出现“运行时错误 6:溢出”。我想我已经为每个变量分配了正确的类型。请帮忙!!
Sub UseCoeff()
Dim a, b As Long
Dim Value1 As Double
ThisWorkbook.Sheets("UseTableBEA").Activate
For b = 2 To 427
For a = 2 To 431
Value1 = ThisWorkbook.Sheets("UseTableBEA").Cells(a, b).Value / ThisWorkbook.Sheets("UseTableBEA").Cells(432, b).Value
ThisWorkbook.Sheets("UseCoeff").Cells(a, b).Value = Value1
Next a
Next b
End Sub
每个单元格的结果可能介于 0 和 1 之间,最多八位小数。提前致谢!!