我正在使用VBA - Word表单,我试图将其设置为当用户选中复选框时,它们输入与复选框对应的值。我对VBA没有很多经验,因为我通常从不使用这种东西。因此,当我运行程序时,我得到错误代码我发布为标题。
'When checked, number of days must be > 0.
If chkOnLine.Value = True Then
If txtOnLine.Text <> "" Then
blnTemp = IsNumeric(txtOnLine.Text)
If Not blnTemp Then
blnError = True
strError = "On-line sessions must be numeric."
GoTo EndError
End If
If txtOnLine.Text <= 0 Then
blnError = True
strError = "Value must be greater than zero."
GoTo EndError
End If
End If
End If