¦p¦ó§Q¥ÎVBAIJµoÀx¦s®æ²£¥Í¤é´Á.®É¶¡
- ©«¤l
- 522
- ¥DÃD
- 36
- ºëµØ
- 1
- ¿n¤À
- 603
- ÂI¦W
- 0
- §@·~¨t²Î
- win xp sp3
- ³nÅ骩¥»
- Office 2003
- ¾\ŪÅv
- 50
- ©Ê§O
- ¨k
- µù¥U®É¶¡
- 2012-12-13
- ³Ì«áµn¿ý
- 2021-7-11
|
¥»©«³Ì«á¥Ñ yen956 ©ó 2016-1-8 15:55 ½s¿è
¸Õ¸Õ¬Ý!!- Private Sub Worksheet_Change(ByVal Target As Range)
- Dim Lst As Integer, r As Integer
- Lst = [A65536].End(xlUp).Row
- If Target.Count > 2 Then Exit Sub '¦pªG¤@¦¸§ïÅܦh®æ«h¨S§@¥Î
- r = Target.Row
- If r > Lst Then Exit Sub '¦pªG³Ì¤U±ªº³¡ªù¬°ªÅ¥Õ«h¨S§@¥Î
-
- '¦pªG§ïÅܪºÀx¦s®æ¤£¦b BÄæ ©Î CÄæ «h¨S§@¥Î
- If Target.Column <> 2 And Target.Column <> 3 Then Exit Sub
-
- '¦pªG Target ¬°ªÅ¥Õ, «h¹j¨âÄæ¤Ï¥Õ, ¨Ã²M°£[Fxx]
- If Target = "" Then
- Target.Offset(0, 2) = ""
- Target.Offset(0, 2).Interior.ColorIndex = 35
- Cells(r, 6) = ""
- Else
- Target.Offset(0, 2) = Now '§_«h¹j¨âÄæ¨ú®ø¤Ï¥Õ, ¶ñ¤J²{¦b®É¶¡
- Target.Offset(0, 2).Interior.ColorIndex = xlNone
- End If
-
- '¦pªG [Dxx] ¤Î [Exx] ¤£¬OªÅ¥Õ, ¦b [Fxx] pºâ®É®t(¥H¤ÀÄÁ¬°³æ¦ì)
- If Cells(r, 4) <> "" And Cells(r, 5) <> "" Then
- Cells(r, 6) = Int((Cells(r, 5) - Cells(r, 4)) * 24 * 60)
- End If
- End Sub
½Æ»s¥N½X
|
|
|
|
|
|
|
- ©«¤l
- 522
- ¥DÃD
- 36
- ºëµØ
- 1
- ¿n¤À
- 603
- ÂI¦W
- 0
- §@·~¨t²Î
- win xp sp3
- ³nÅ骩¥»
- Office 2003
- ¾\ŪÅv
- 50
- ©Ê§O
- ¨k
- µù¥U®É¶¡
- 2012-12-13
- ³Ì«áµn¿ý
- 2021-7-11
|
¦^´_ 2# ML089
·PÁ ML089¶Wª©ªºVBAªº |
|
|
|
|
|
|
- ©«¤l
- 169
- ¥DÃD
- 39
- ºëµØ
- 0
- ¿n¤À
- 252
- ÂI¦W
- 0
- §@·~¨t²Î
- XP
- ³nÅ骩¥»
- 2003
- ¾\ŪÅv
- 20
- µù¥U®É¶¡
- 2011-4-17
- ³Ì«áµn¿ý
- 2020-7-17
 
|
¦^´_ 2# ML089
¯u¦hÁÂML089¦Ñ®vªº¦^µª¡A¦pªG¿é¤J¤é´Á.®É¶¡«á¡A§Ú¦b¤â°Ê§ó§ï°_©l®É¶¡©Îµ²§ô®É¶¡¡A¥i§_Åý²Îpªº"¤À"¡A¤]¦P®É¦P¨BÅܧó¥[Á`¡A³Â·Ð¦Ñ®v¤F^^ |
|
|
|
|
|
|
- ©«¤l
- 2025
- ¥DÃD
- 13
- ºëµØ
- 0
- ¿n¤À
- 2053
- ÂI¦W
- 0
- §@·~¨t²Î
- WIN7
- ³nÅ骩¥»
- Office2007
- ¾\ŪÅv
- 100
- ©Ê§O
- ¨k
- ¨Ó¦Û
- ¥x¥_¥«
- µù¥U®É¶¡
- 2011-3-2
- ³Ì«áµn¿ý
- 2024-3-14
     
|
- Private Sub Worksheet_Change(ByVal Target As Range)
- Dim r%, xD As Range, xE As Range, xF As Range
- With Target
- If .Count > 1 Then Exit Sub
- If Intersect(Union([B:B], [C:C]), .Cells) Is Nothing Then Exit Sub
- Application.EnableEvents = False
- .Offset(0, 2).Value = Now()
- r = .Row() - 1: Set xD = [D1].Offset(r, 0): Set xE = [E1].Offset(r, 0): Set xF = [F1].Offset(r, 0)
- If Application.Count(xD, xE) = 2 Then xF = Int((xE - xD) * 24 * 60)
- Application.EnableEvents = True
- End With
- End Sub
½Æ»s¥N½X |
|
{...} ªí¥Ü»Ýn¥Î CTRL+SHIFT+ENTER ¤TÁä¿é¤J¤½¦¡
|
|
|
|
|