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

Worksheet_change¤ºªº®æ¦¡Âà´«ªº°ÝÃD, ½Ð±Ð«e½ú.

Worksheet_change¤ºªº®æ¦¡Âà´«ªº°ÝÃD, ½Ð±Ð«e½ú.

Excel ªþÀɦW¬°xls

¦p¤Uµ{¦¡½X,  «e¤H¼¶¼gªº, ­ì¶]¦n¦nªº, ¬ðµM¤£¦æ.
¾Þ§@¬°¦b¸ÓÄæ¦ì±½ºË¦r¦ê =now(),  ¥Ñ¤Uvba§ï¬°¦r¦ê¦s¦Ü­ìÄæ¦ì.
µ{¦¡½X¦p¤U¤è:

±N­ìCstr§ï¥ÎFormat , ¤@¥X²{¿ù»~(Âà´«¥¢±Ñ)«á§Y¤£¦æ¤F,
¥²¶·²M±¼¿ù»~, ¦sÀÉ«á­«·s¶}±Ò, ¤~·|±N=now()Âର¦r¦ê.

Private Sub Worksheet_Change(ByVal Target As Range)
Dim Rtol As Double

'If Target.Column = 14 Then
    ''conver string
    'Sheet2.Cells(Target.Row, Target.Column) = CStr(Sheet2.Cells(Target.Row, Target.Column))
    Sheet2.Cells(Target.Row, Target.Column) = Format(Sheet2.Cells(Target.Row, Target.Column), "YYYY/MM/DD hh:mm:ss AMPM")
'End If

If Target.Column = 15 Then
    Rtol = Target.Row
   If Sheet2.Cells(Rtol, 15) > Sheet2.Cells(Rtol, 16) Then
      MsgBox ("  ³Ñ¾l¼Æ¶q¤£¨¬")
      MsgBox (Rtol)
      MsgBox ("­×¥¿¬°¥¿¼Æ")
      'Åã¥Ü¦æ¿ù»~
      Sheet2.Cells(Rtol, 16) = Math.Abs(Sheet2.Cells(Rtol, 16))
     
      Sheet2.Cells(Rtol, 15) = 0
   End If
End If
End Sub

        ÀR«ä¦Û¦b : ¤H­nª¾ºÖ¡B±¤ºÖ¡B¦A³yºÖ¡C
ªð¦^¦Cªí ¤W¤@¥DÃD