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

[µo°Ý] IF...THEN¤@°Ý

[µo°Ý] IF...THEN¤@°Ý

Private Sub Worksheet_Change(ByVal Target As Range)
'If Cell(D2)¤º¼Æ­È¥X²{§ïÅÜ,Then    <<<½Ð±Ð¤j¤j¡A³o¥yÀ³¦p¦ó¼g¡AÁÂÁÂ!
Call myPrg
End Sub

³o¼Ë¹ï¶Ü?
Private Sub Worksheet_Change(ByVal Target As Range)
Dim rng As Range

    Set rng = Worksheets("Sheet1").[D2]

    If Not Intersect(Target, rng) Is Nothing Then

Call myPrg
End If
End Sub

TOP

¦^´_ 2# cdkee
  1. Option Explicit
  2. Private Sub Worksheet_Change(ByVal Target As Range)   'TargetÅܼƫ¬ºA ¬° Rangeª«¥ó(¦³­×§ï­ÈªºÀx¦s®æ)
  3. '¦¹µ{§Ç¬°¤u§@ªí¼Ò²Õªº¹w³]IJ°Ê¨Æ¥óµ{¦¡: ³o¤u§@ªíªº¥ô¤@Àx¦s®æ¦³­×§ï­È®Éªºµ{§Ç
  4.     Dim rng As Range
  5.     MsgBox Target.Address                        '³o¦æµ{¦¡½X¬OÅý§A¤F¸Ñ¦³­×§ï­ÈÀx¦s®æªº¦ì¸m
  6.     If Target.Address = "$D$2" Then Call myPrg  '¤]¥i¥H³o¼Ë¼g
  7.    ' Set rng = Worksheets("Sheet1").[D2]
  8.    ' If Not Intersect(Target, rng) Is Nothing Then
  9.    ' Call myPrg
  10. End Sub
½Æ»s¥N½X
·P®¦ªº¤ß......(¦b³Â»¶®a±Ú°Q½×°Ï.¥Î¤ß¾Ç²ß·|¦³¶i¨Bªº)
¦ý¸ê·½µL­­,«á´©¦³­­,  ¤@¤Ñ1¤¸ªºÃÙ§U,¤H¤H¦³¯à¤O.

TOP

¦^´_ 3# GBKEE

ÁÂÁª©¤j«ü¾É!

TOP

        ÀR«ä¦Û¦b : ±o²z­nÄǤH¡A²zª½­n®ð©M¡C
ªð¦^¦Cªí ¤W¤@¥DÃD