在我的代码开始时,我得到了一个未定义的变量,编译错误,我不确定为什么。我将变量声明为双精度型,然后尝试将特定工作表上单元格的值分配给该变量。有人知道为什么这行不通吗? 谢谢。
Option Explicit
Private Sub trial()
Dim incentivebeta As Double
Dim intercept As Double
Dim agebeta As Double
Dim x As Double
incentivebeta = wsLogisticRegression.Range("B3").Value
intercept = wsLogisticRegression.Range("C3").Value
agebeta = wsLogisticRegression.Range("D3").Value
x = incentivebeta
End Sub