- ©«¤l
- 5923
- ¥DÃD
- 13
- ºëµØ
- 1
- ¿n¤À
- 5986
- ÂI¦W
- 0
- §@·~¨t²Î
- win10
- ³nÅ骩¥»
- Office 2010
- ¾\ŪÅv
- 150
- ©Ê§O
- ¨k
- ¨Ó¦Û
- ¥xÆW°ò¶©
- µù¥U®É¶¡
- 2010-5-1
- ³Ì«áµn¿ý
- 2022-1-23
|
¦^´_ 5# acdx - Option Explicit
- Dim Ob(), Msg As Boolean
- Private Sub TextBox1_Exit(ByVal Cancel As MSForms.ReturnBoolean) 'ªí³æÃö³¬®É·|°õ¦æ¦¹µ{¦¡
- If Text_Checking(TextBox1) = False Then Cancel = True 'ªí³æ¾nÂI¯d¦bTextBox1¤W
- End Sub
- Private Sub TextBox2_Exit(ByVal Cancel As MSForms.ReturnBoolean)
- If Text_Checking(TextBox2) = False Then Cancel = True
- End Sub
- Private Function Text_Checking(T As MSForms.TextBox) As Boolean
- Dim I As Variant
- Text_Checking = True '¹w³]¬° True
- If Msg Then Exit Function 'ªí³æ¤wÃö³¬
- I = Application.Match(Val(T), Ob, 0) '§ä¤£¨ì
- If IsError(I) Then Text_Checking = False
- If Text_Checking = False Then MsgBox T & " ¤£¬O¥¿½Tªº¼Æ¦r" & vbLf & Join(Ob, vbTab) & vbLf & "¥H¤W¬°¥¿½Tªº¼Æ¦r"
- End Function
- Private Sub UserForm_Initialize()
- Ob = Array(100, 125, 160, 200, 250, 315, 400, 500, _
- 630, 800, 1000, 1250, 1600, 2000, 2500, 3150, _
- 4000, 5000, 6300, 8000, 10000, 12500, 16000, 20000)
- End Sub
- Private Sub UserForm_QueryClose(Cancel As Integer, CloseMode As Integer)
- Msg = True 'ªí³æÃö³¬®ÉÅܼƳ]¬° True
- End Sub
½Æ»s¥N½X |
|