- ©«¤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
|
¥»©«³Ì«á¥Ñ GBKEE ©ó 2017-3-12 07:46 ½s¿è
¦^´_ 3# sillykin
¸Õ¸Õ¬Ý- Private Sub TextBox3_Change()
- Dim Msg As Boolean
- '°ò¥»¨¤ÀÃÒÅçÃÒ¡A
- '1.¬°n10½X -> Len(TextBox3) = 10
- '2 ²Ä¤@½X¬°^¤å¦r¥À«á9½X¥þ¬°¼Æ¦r ->TextBox3.Text Like "[A-z]#########"
-
- '**** ¦ý¹ê»Ú¤W¬F©²¦³¨¤ÀÃÒªºÅçÃÒ³W«h *****
- Msg = Len(TextBox3) = 10 And TextBox3.Text Like "[A-z]#########" '¨ä¤¤¤@¶µ¤£¬°¯u Msg =False
- 'Label18.¬°ªí³æ¤W,²Î¤@½s¸¹ªºLabel±±¨î¶µ
- Label18.BackColor = IIf(Msg, &HFFFFC0, &HFF&) '«ü©wª«¥óªºI´º¦â±m¡C
-
- End Sub
- Private Sub CommandButton2_Click() 'ªí³æ¤W¸ê®Æ¿é¤J,½Ð·s¼W¤@«ö¶s,¦¹«öÁä¯Ãªºµ{¦¡½X
- Dim Msg As String, Ar(), E As Variant, Rng As Range
- Ar = Array(TextBox2, TextBox3, TextBox4, TextBox5, TextBox6) '±±¨î¶µ¸m¤J°}¦C
- '********¨¾§bµ{¦¡½X**********
- Msg = IIf(Label18.BackColor = &HFF&, "²Î¤@½s¸¹ ¦³¿ù»~", "")
- For Each E In Ar
- If E = "" Then Msg = Msg & IIf(Msg <> "", vbLf, "") & "¸ê®Æ¿é¤J¤£»ô¥þ": Exit For
- Next
- If Msg <> "" Then MsgBox Msg: Exit Sub
- Set Rng = Range("b50:P50") '«ü©wªº¦ì¸m
- E = Application.CountA(Rng) 'pºâ¦ì¸m¤¤¦³¸ê®ÆªºÓ¼Æ
- '**«ü©w¦ì¸m,¸ê®Æ¦ì¸mªºÀˬd
- If E > 0 Then
- If E = Rng.Cells.Count Then MsgBox "¸ê®Æ¤wº¡ ! ½ÐÀˬd ": Exit Sub
- If Rng.Cells(E).Address <> Rng.Cells(Rng.Cells.Count).End(xlToLeft).Address Then MsgBox "¸ê®Æ¦ì¸m¦³»~ ! ½ÐÀˬd ": Exit Sub
- End If
-
- '********¨¾§bµ²§ô**********
- If MsgBox("½T©w ¿é¤J¸ê®Æ!", vbYesNo) = vbNo Then Exit Sub
- '******¸ê®Æ¿é¤J*************************************
- With Rng.Offset(0, E)
- .Resize(UBound(Ar) + 1, 1).Value = Application.WorksheetFunction.Transpose(Ar)
- End With
- End Sub
½Æ»s¥N½X |
|