■ Excel/ㅡExcel VBA Code
엑셀 VBA 특정 셀선택 자동 매크로 실행
with seok
2020. 11. 8. 22:24
엑셀 VBA 특정 셀선택 자동 매크로 실행 |
1
2
3
4
5
6
7
|
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If Selection.Count = 1 Then
If Not Intersect(Target, Range("A1")) Is Nothing Then
Call 매크로이름
End If
End If
End Sub
|
cs |
응용 |
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
|
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If Selection.Count = 1 Then
If Not Intersect(Target, Range("Q1")) Is Nothing Then
Call 전체보기
End If
End If
If Selection.Count = 1 Then
If Not Intersect(Target, Range("Q2")) Is Nothing Then
Call 일부보기
End If
End If
End Sub
|
cs |
728x90