当我从按钮运行宏时,获取运行时错误'6'溢出,但是当我从vba运行宏时,则什么也没有。
Dim sumnands1 As Double
Dim sumnands2 As Double
Dim nands As Double
'sumnands1 = 1070.9915368616
'sumnands2 = 3027.34663906532
sumnands1 = WorksheetFunction.Sum(Range("N4:N369"))
sumnands2 = WorksheetFunction.Sum(Range("O4:O369"))
'the line below is where i am getting an error
nands = 1 - sumnands1 / sumnands2
Worksheets("accuracy").Cells(7, 3) = nands
该按钮的代码仅仅是 呼叫nameofsub