๋ฐ์ํ
https://mainia.tistory.com/5533
Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, Cancel As Boolean)
If Target.Interior.Color = vbRed Then
Target.Interior.Color = xlNone
Else
Target.Interior.Color = vbRed
End If
Cancel = True
End Sub
https://blog.daum.net/monogatari/13409674
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If Not Intersect(Target, Range("b4:b200")) Is Nothing Then
Range("b2").Value = TargetValue
End If
End Sub
https://pfe2000.tistory.com/382
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If Selection.Count = 1 Then
If Not Intersect(Target, Range("e1")) Is Nothing Then
Call ์ํํ์
End If
If Not Intersect(Target, Range("d2")) Is Nothing Then
Call ์ค๋ฆ์ ๋ ฌ
End If
If Not Intersect(Target, Range("d1")) Is Nothing Then
Call ๋ด๋ฆผ์ ๋ ฌ
End If
If Not Intersect(Target, Range("c1")) Is Nothing Then
Call ์์
๋ณด๊ธฐ
End If
If Not Intersect(Target, Range("b1")) Is Nothing Then
Call ์ ์ฒด๋ณด๊ธฐ
End If
If Not Intersect(Target, Range("b4")) Is Nothing Then
Call ์ง์ถ_์ ์ถ_ํฌ์
End If
If Not Intersect(Target, Range("b5")) Is Nothing Then
Call ์ง์ถ_์ฃผ๊ฑฐ
End If
If Not Intersect(Target, Range("b6")) Is Nothing Then
Call ์ง์ถ_์๋น
End If
If Not Intersect(Target, Range("b7")) Is Nothing Then
Call ์ง์ถ_์ํ์ฉํ
End If
If Not Intersect(Target, Range("b8")) Is Nothing Then
Call ์ง์ถ_์๋ณต_๋ฏธ์ฉ
End If
If Not Intersect(Target, Range("b9")) Is Nothing Then
Call ์ง์ถ_๊ฑด๊ฐ
End If
If Not Intersect(Target, Range("b10")) Is Nothing Then
Call ์ง์ถ_์๊ธฐ๊ณ๋ฐ
End If
If Not Intersect(Target, Range("b11")) Is Nothing Then
Call ์ง์ถ_์๋์ฐจ
End If
If Not Intersect(Target, Range("b12")) Is Nothing Then
Call ์ง์ถ_์ก์
End If
If Not Intersect(Target, Range("b13")) Is Nothing Then
Call ์ง์ถ_๋ณดํ
End If
If Not Intersect(Target, Range("b14")) Is Nothing Then
Call ์ง์ถ_์ด๋ฒคํธ
End If
If Not Intersect(Target, Range("b15")) Is Nothing Then
Call ์ง์ถ_์ฌ๊น๋น
End If
If Not Intersect(Target, Range("b16")) Is Nothing Then
Call ์ง์ถ_ํ๊ธ
End If
If Not Intersect(Target, Range("b17")) Is Nothing Then
Call ์ง์ถ_๊ธฐ๋ถ
End If
If Not Intersect(Target, Range("b18")) Is Nothing Then
Call ์ง์ถ_ํต์ ๋น
End If
If Not Intersect(Target, Range("b19")) Is Nothing Then
Call ์ง์ถ_๊ธฐํ
End If
End If
End Sub
Dim ~ As Boolean : a์ b๊ฐ Boolean ํ
Sub T()
Dim a As Boolean
Dim b As Boolean
a = True
b = 0
Debug.Print (a)
Debug.print (b)
End Sub
Function. ํจ์ ๋ง๋ค๊ธฐ
Sub T()
Cells(1, 1) = ๋ฉํธ(์ด๋ฆ)
End Sub
Function ๋ฉํธ(์ด๋ฆ)
ment = "์๋
ํ์ธ์"
ment = ment + ์ด๋ฆ
ment = ment + "๋ ํ๋ก๊ทธ๋จ์ ์์ํ๊ฒ ์ต๋๋ค."
๋ฉํธ = ment
End Function
์ฐธ๊ณ
๋ฐ์ํ
'Tools > Excel' ์นดํ ๊ณ ๋ฆฌ์ ๋ค๋ฅธ ๊ธ
[Excel] VBA ๋งคํฌ๋ก ํฌ๋กค๋ง ๋ง๋ค๊ธฐ (0) | 2022.07.23 |
---|