Private Sub Worksheet_Change(ByVal Target As Range)
Worksheets("Order_Form").Cells(39, 2) = Environ("USERNAME")
' Pop up a warning when the user input more than 1000 cases
If Target.Column = 7 And (Target.Row < 34 And Target.Row > 13) Then
If Cells(Target.Row, Target.Column) > 1000 Then MsgBox "You are ordering more than 1000 cases", vbCritical
End If
End Sub
这会导致堆栈空间不足错误(运行时错误 1004)
它通常发生在我尝试编辑任何单元格时
任何人有想法为什么?
谢谢!