- ©«¤l
- 43
- ¥DÃD
- 9
- ºëµØ
- 0
- ¿n¤À
- 79
- ÂI¦W
- 1
- §@·~¨t²Î
- windows 7
- ³nÅ骩¥»
- office 2016
- ¾\ŪÅv
- 20
- µù¥U®É¶¡
- 2017-7-23
- ³Ì«áµn¿ý
- 2024-9-15
|
¦buserform2¤¤¡A³]¸m¤F¤@Ótextbox¡A¦WºÙ: TB2
¦ÓTB2Y¦³¿é¤J¼ÆÈ¡A«h Label·|§Y®É§ó·s¡C
TB1ªº³¡¥÷¬°¿é¤J¤é´Á: 2016/01/01 or 2017/09/05
TB2¿é¤Jªº®æ¦¡¬°:0800-2000 or 0800-1700
¦Ó¡A¹Bºâ§¹ Label·|§Y®ÉÅã¥Ü¨âªÌ¬Û®t´X¤p®É¡A¥Ø«e¥u¯à¾aµÛ commandButton_Click¨Ó¹F¦¨...
§Æ±æ¥i¥H§@¦¨¦bUserform¤U´N·|¦Û°Ê§ó·s- Dim timebox1, timebox2 As Variant
- timebox1 = TimeValue(Mid(TB2, 1, 2) & ":" & Mid(TB2, 3, 2))
- timebox2 = TimeValue(Mid(TB2, 6, 2) & ":" & Mid(TB2, 8, 2))
- Label9 = (DateDiff("n", DateValue(TB1) & timebox1, DateValue(TB1) & timebox2)) / 60
½Æ»s¥N½X ----------------------------------------------------------------------------------------
¶â...¡A©êºp¡A¦bµoªí³oÃä¤å³¹«á¡A§ä¨ì¤F¥i¥Îªºµª®×
¥Ñ©ó¶W¹L3¤ÀÄÁ¡A¤£¥i¥H¶i¦æ½s¿è¡A©Ò¥H¦^¦b¤U¤èQQ
ÄmÁà¤F....
§Q¥Î TB2_Exitªº¤è¦¡¥h¹F¦¨- Private Sub TB2_Exit(ByVal Cancel As MSForms.ReturnBoolean)
- timebox1 = TimeValue(Mid(TB2, 1, 2) & ":" & Mid(TB2, 3, 2))
- timebox2 = TimeValue(Mid(TB2, 6, 2) & ":" & Mid(TB2, 8, 2))
- Label9 = (DateDiff("n", DateValue(TB1) & timebox1, DateValue(TB1) & timebox2)) / 60
- End Sub
½Æ»s¥N½X |
|