ªð¦^¦Cªí ¤W¤@¥DÃD µo©«

¦p¦ó­­¨îTextbox¦r¼Æ~·í¦r¼Æ¨ì¤F~´«¤U¤@­ÓTextbox

¦p¦ó­­¨îTextbox¦r¼Æ~·í¦r¼Æ¨ì¤F~´«¤U¤@­ÓTextbox

¨Ò¦p¦³Textbox1,Textbox2,Textbox3

Textbox1 ­­¨î¦r¼Æ1
Textbox2 ­­¨î¦r¼Æ4
Textbox3 ­­¨î¦r¼Æ4

§ÚÂI¿ïTextbox1
¤@¦¸¿é¤J5­Ó¼Æ¦r411120848
Textbox1 ¥X²{ 4
Textbox2 ¥X²{ 1112
Textbox3 ¥X²{ 0848

¥»©«³Ì«á¥Ñ av8d ©ó 2013-11-12 10:37 ½s¿è

§ä¨ì¤èªk¤F~
  1. Private Sub TextBox1_Change()
  2.     If TextBox1.MaxLength = 1 Then
  3.         TextBox2.SetFocus
  4.     End If
  5. End Sub
½Æ»s¥N½X
¥i¬O¨ì³o¸Ì´N¥d¦í¤F
Private Sub TextBox2_Change()
    If TextBox2.MaxLength = 4 Then
        TextBox3.SetFocus
    End If
End Sub

·íTextBox2¿é¤J¤@­Ó¼Æ¦r´N·|¦Û°Ê¸õ¨ìTextBox3

¥Ø«eµL¸Ñ¤¤

TOP

¦^´_ 2# av8d
³o¬O§A­nªº¶Ü¡H
  1. Private Sub TextBox1_Change()
  2.     If Len(TextBox1) = 9 Then
  3.         TextBox2 = Mid(TextBox1, 2, 4)
  4.         TextBox3 = Mid(TextBox1, 6, 4)
  5.         TextBox1 = Left(TextBox1, 1)
  6.     End If
  7. End Sub
½Æ»s¥N½X

TOP

¥»©«³Ì«á¥Ñ av8d ©ó 2013-11-12 10:48 ½s¿è

¦^´_ 3# c_c_lai


    ÁÂÁ¤j¤jªº´£¥Ü
¥Ø«e»Ý¨D¸Ñµª¦p¤U
Private Sub TextBox1_Change()
    If Len(TextBox1) = 1 Then
        TextBox2.SetFocus
    End If
End Sub

Private Sub TextBox2_Change()
    If Len(TextBox2) = 4 Then
        TextBox3.SetFocus
    End If
End Sub

¤]¾Ç²ß¤F¤j¤jªº¤èªk~¶¶±a¸ß°Ý¤@¤U
TextBox2 = Mid(TextBox1, 2, 4)
TextBox3 = Mid(TextBox1, 6, 4)
ªº·N«ä?

TOP

¦^´_ 4# av8d
  1. TextBox1 = "411120848"  '  °²³]¤§¿é¤J­È

  2. TextBox2 = Mid(TextBox1, 2, 4)
  3. TextBox2 = Mid("411120848", ²Ä¤G­Ó¦ì¸m°_¶}©l¡AºI¨ú¥|¦ì)
  4. TextBox2 = "1112"

  5. TextBox3 = Mid(TextBox1, 6, 4)
  6. TextBox3 = Mid("411120848", ²Ä¤»­Ó¦ì¸m°_¶}©l¡AºI¨ú¥|¦ì)
  7. TextBox3 = "0848"

  8. TextBox1 = Left(TextBox1, 1)
  9. TextBox1 = Left("411120848", ±q¥ª¶}©lºI¨ú¤@¦ì)
  10. TextBox1 = "1"
½Æ»s¥N½X

TOP

        ÀR«ä¦Û¦b : ª¾ÃÑ­n¥Î¤ßÅé·|¡A¤~¯àÅܦ¨¦Û¤vªº´¼¼z¡C
ªð¦^¦Cªí ¤W¤@¥DÃD