VBA를 사용하여 셀 값을 확인하고 셀 값이 값 이상이면 전자 메일 모듈로 전자 메일을 보냅니다.두 개의 개인 하위 워크 시트를 결합하십시오 .Change
여러 개의 셀을 검사하지만 VBA에서 두 개의 개인 하위 Worksheet_Change를 가질 수 없다는 것을 알고 싶습니다. 여러 셀을 검사하는 가장 좋은 방법은 무엇입니까?
다음은 현재 사용중인 코드입니다.
Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Cells.Count > 1 Then Exit Sub
If Not Application.Intersect(Range("A1"), Target) Is Nothing Then
If IsNumeric(Target.Value) And Target.Value > 10 Then
Call Mail_small_Text_Outlook
End If
End If
End Sub
여기에 나는 하나 개의 하위에 결합하고 싶습니다 가능하면 또 다른
Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Cells.Count > 1 Then Exit Sub
If Not Application.Intersect(Range("B1"), Target) Is Nothing Then
If IsNumeric(Target.Value) And Target.Value > 20 Then
Call Mail_small_Text_Outlook
End If
End If
End Sub
'If Not Application.Intersect ...'블록을 같은 Sub에 차례대로 삽입하지 않는 이유는 무엇입니까? –