我是VBA的新手,我的脚本一直在重复,我不确定为什么。有人能帮我解决这个问题吗?我只想在J3:K4中的任意值大于10时运行脚本'mail_small_text_outlook‘。J3:K4每30分钟自动重新计算一次。
提前谢谢。
Private Sub Worksheet_Calculate()
Dim target As Range
Set target = Range("J3:K4")
If target Is Nothing Then Exit Sub
If IsNumeric(target) And target > 10 Then
Call Mail_small_Text_Outlook
End If
End Sub发布于 2018-12-20 16:54:58
您必须遍历区域中的单元格
Sub Worksheet_Calculate()
Dim target As Range
Set target = Range("J3:K4")
Dim cel As Range
For Each cel In target.Cells
If IsNumeric(cell) And cell > 10 Then
Call Mail_small_Text_Outlook
End If
Next cel
End Subhttps://stackoverflow.com/questions/53865102
复制相似问题