Worksheet_change¤ºªº®æ¦¡Âà´«ªº°ÝÃD, ½Ð±Ð«e½ú.
- ©«¤l
- 61
- ¥DÃD
- 7
- ºëµØ
- 0
- ¿n¤À
- 72
- ÂI¦W
- 0
- §@·~¨t²Î
- win 7
- ³nÅ骩¥»
- Office 2010
- ¾\ŪÅv
- 20
- ©Ê§O
- ¨k
- µù¥U®É¶¡
- 2014-11-4
- ³Ì«áµn¿ý
- 2015-9-16
|
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 |
|
|
|
|
|
|