ªð¦^¦Cªí ¤W¤@¥DÃD µo©«

[µo°Ý] Worksheet_Change¦h±ø¥ó

[µo°Ý] Worksheet_Change¦h±ø¥ó

½×¾Â­ºµo¡A½Ð¦h«ü±Ð
§Ú·Q¹ï²Ä3. 6. 9 Ä榳Åܧó®É°µ°Ê§@
Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Column = 3 Or 6 Or 9 Then
    MsgBox ("OK")
Else
    Exit Sub
End If
End Sub

³æ¯Â¼gTarget.Column = 3 ®É¡A¬O¥i¦æªº¡A¦ý¥[¤WOr´N¤£·|¨«¨ìelse
½Ð±Ð§ï«ç»ò­×¥¿?

¦^´_ 1# simon552614
  1. Private Sub Worksheet_Change(ByVal Target As Range)
  2. Select Case Target.Column
  3. Case 3
  4. MsgBox ("OK")
  5. Case 6
  6. MsgBox ("OK")
  7. Case 9
  8. MsgBox ("OK")   
  9. End Select
  10. End Sub
½Æ»s¥N½X

TOP

¥ÇÄø¤F¡A³ºµM§Ñ°Oand©Morªº±ø¥ó«ç»ò¤U

ÁÂÁ´£¨Ñ¨ä¥L½d¨Ò

TOP

¦^´_ 1# simon552614


A:   
If Target.Column = 3 Or Target.Column = 6 Or Target.Column = 9 Then
   MsgBox ("OK")
End If

B:
With Target
   If InStr("3,6,9", .Column) Then
      MsgBox ("OK")
   End If
End With

C:
With Target
   If InStr("3,6,9", .Column) And .Count = 1 Then
      MsgBox ("OK")
   End If
End With

D:
With Target
   If InStr("3,6,9", .Column) And .Count = 1 And .Row > 10 Then
      MsgBox ("OK")
   End If
End With
¥Î¦æ°Ê¸Ë¸mÂsÄý½×¾Â¾Ç²ß«Ü¤è«K,ÁÂÁ½׾¸gÀç¹Î¶¤
½Ð¤j®a¤@°_¤W½×¾Â¨Ó¥æ¬y

TOP

        ÀR«ä¦Û¦b : ¦h°µ¦h±o¡C¤Ö°µ¦h¥¢¡C
ªð¦^¦Cªí ¤W¤@¥DÃD