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

[µo°Ý] ·í«ö¤U«ö¶s°õ¦æµL»~¡A¦ý¬O³z¹LÂà´«¡A«o¥X²{¤£¦Pªºµ²ªG¡C

[µo°Ý] ·í«ö¤U«ö¶s°õ¦æµL»~¡A¦ý¬O³z¹LÂà´«¡A«o¥X²{¤£¦Pªºµ²ªG¡C

Private Sub TextBox1_KeyDown(ByVal KeyCode As MSForms.ReturnInteger, ByVal Shift As Integer)
    If KeyCode = 13 Then CommandButton1_Click
End Sub

¥H¤W¬O·í¦bTextBox1«ö¤UEnterÁä«á¡A°õ¦æCommandButton1

Private Sub CommandButton1_Click()
                With TextBox1
                    .SetFocus
                    .SelStart = 0
                    .SelLength = Len(.Text)
                End With
End Sub

§Ú­Ì¤@¯ë«ö¤U«ö¶sCommandButton1¡ATextBox1¤ºªº¦r·|³Q¥þ¿ï¡C
¦ý¬O·í¦bTextBox1«ö¤UEnterÁä«á¡A°õ¦æCommandButton1¡ATextBox1¤ºªº¦r«o¤£·|³Q¥þ¿ï¡C

¦pªþ¥ó¡G
Test5.rar (27.78 KB)

¦^´_ 22# av8d
¸Õ¸Õ¬Ý ¬O³o¼Ë¶Ü?
  1. Private Sub CommandButton1_Click()
  2.     Dim CB As String, TB As String, ER As String, I As Integer
  3.     CB = ComboBox1
  4.     TB = TextBox1
  5.     For I = 1 To 3
  6.         If ½T»{±K½X(CB, TB) = "±K½X¥¿½T" Then
  7.             GoTo MS
  8.         Else
  9.             TextBox1 = InputBox("±K½X¿ù»~! " & I & "¦¸", "ĵ§i¡I", "½Ð¿é¤J¥¿½T±K½X¡I")
  10.             TB = TextBox1
  11.         End If
  12.     Next
  13.     MsgBox "±K½X¿ù»~! 3¦¸ Ãö³¬ Excel"
  14.     Application.Quit
  15.     Exit Sub
  16. MS:
  17.     MsgBox "±K½X¥¿½T"
  18.     Username = ComboBox1
  19.     Unload Me
  20. End Sub
  21. Private Function ½T»{±K½X(CB As String, TB As String) As String
  22.     Dim I As Integer
  23.     ½T»{±K½X = "±K½X¿ù»~"
  24.     With Sheets("»\´Ö³Q¯Â²á¤Ñ¨t²Î")
  25.         For I = 3 To 5
  26.             If CB = .Range("N" & I) And TB = .Range("O" & I) Then
  27.                 ½T»{±K½X = "±K½X¥¿½T"
  28.                 Exit For
  29.             End If
  30.         Next
  31.   End With
  32. End Function
½Æ»s¥N½X
·P®¦ªº¤ß......(¦b³Â»¶®a±Ú°Q½×°Ï.¥Î¤ß¾Ç²ß·|¦³¶i¨Bªº)
¦ý¸ê·½µL­­,«á´©¦³­­,  ¤@¤Ñ1¤¸ªºÃÙ§U,¤H¤H¦³¯à¤O.

TOP

¦^´_ 21# GBKEE


    Test10.rar (30.39 KB)
·í±K½X¥X²{¿ù»~®É¡A·|¸õµ¡Åý¨Ï¥ÎªÌ¦b¿é¤J¤@¦¸¡A¿é¤J¥H«á¤S·|¸õ¦^­ì¨ÓªºUserForm1µ¡¡A¦A¦¸µn¤J´ú¸Õ

¬O§_¦³¿ìªkÅý¥L¤£­n¸õ¦^­ì¨ÓªºUserForm1µ¡~ª½±µ¦A¦¸µn¤J´ú¸Õ¡H

TOP

¥»©«³Ì«á¥Ñ GBKEE ©ó 2013-3-22 13:20 ½s¿è

¦^´_ 20# av8d
¸Õ¸Õ¬Ý





Sheet1ªºCommandButton1_Click()

DSC00220.JPG.rar (20.54 KB)
·P®¦ªº¤ß......(¦b³Â»¶®a±Ú°Q½×°Ï.¥Î¤ß¾Ç²ß·|¦³¶i¨Bªº)
¦ý¸ê·½µL­­,«á´©¦³­­,  ¤@¤Ñ1¤¸ªºÃÙ§U,¤H¤H¦³¯à¤O.

TOP

¦^´_ 17# GBKEE


    G¤j~½Ð°Ý¦pªG§Ú­n§ï¼g¦¨InputBox~¸Ó¦p¦ó§ï¼g©O?
¦pªþ¥ó
Test6.rar (29.36 KB)

TOP

¦^´_ 18# av8d

¦n¹³¬Otabªº°ÝÃD¡A§A±qtextbox«öenter«á¡A·|¸õ¨ì¤U¤@­Ó¶¶§Çªºª«¥ó¥h
­n«ç»ò§ï¡AÁÙ­n¬ã¨s¤@¤U¡A§Ú¤]¦bºCºC§V¤O¼W¶i¦Û¤vªºª¾ÃÑ
¤]½Ð±z¦h¦h«ü±Ð

TOP

¦^´_ 16# mickeymiles


    ÁÂÁ¤j¤j~¬O¥þ¿ïª¬ºA~¦ý¬O¤£¯à¥´¦r~¤£ª¾¹D¬°¤°»ò~@

TOP

¦^´_ 10# av8d
¸ê®Æ«¬ºA°ÝÃD
Dim CB As String, TB As String
  1. Private Sub CommandButton1_Click()
  2.     Dim CB As String, TB As String, ER As String, i As Integer
  3.     CB = ComboBox1.Value
  4.     TB = TextBox1.Value
  5.     With Sheets("»\´Ö³Q¯Â²á¤Ñ¨t²Î")
  6.         For i = 2 To 4
  7.             If CB = .Range("N" & i) And TB = .Range("O" & i) Then
  8.                 ER = ""
  9.                 Username = ComboBox1
  10.                 'Ãö³¬µøµ¡
  11.            Unload Me             'ÁÙ¬O­n°õ¦æµ{¦¡ªºForªº°j°é
  12.            'ÁôÂÃUserForm1µøµ¡
  13.            'UserForm1.Hide    'ÁÙ¬O­n°õ¦æµ{¦¡ªºForªº°j°é
  14.            GoTo MS
  15.             Else
  16.                 ER = "±K½X¿ù»~¡I"
  17.             End If
  18.         Next
  19.     End With
  20. MS:
  21.     If ER = "±K½X¿ù»~¡I" Then MsgBox ER   
  22. End Sub
½Æ»s¥N½X
·P®¦ªº¤ß......(¦b³Â»¶®a±Ú°Q½×°Ï.¥Î¤ß¾Ç²ß·|¦³¶i¨Bªº)
¦ý¸ê·½µL­­,«á´©¦³­­,  ¤@¤Ñ1¤¸ªºÃÙ§U,¤H¤H¦³¯à¤O.

TOP

¦^´_ 1# av8d
¤U¦C¦A¥[¤J  .HideSelection = False¡A¦n¹³´N¥i¥H¤F
¦Ü©ó¬°¤°»ò¤@¶}©lªº¤£¦æ¡A¥i¯à­n½Ðª©¤W«e½ú«ü±Ð¤@¤U¤F

                 With TextBox1
                     .SetFocus
                     .SelStart = 0
                     .SelLength = Len(.Text)
                      .HideSelection = False
                 End With

TOP

¦^´_  Hsieh


    ¨Ï¥Î¤F¤j¤jµ¹ªº~¥i¥H¤F~¥i¯à¿é¤J¿ù»~µLªkÅý¥LÅã¥Ü¤F!
av8d µoªí©ó 2013-3-20 16:55





³o­Ó¬O§Ú¤§«e½s¼g¸ê®Æ¬d¾\¥\¯àªº³q¦æÃÒ
¦ý¥u¦³¤@¹ï¤@
¥i±N·í¤¤ªº
    realpsd = ¤u§@ªí1.Cells(2, "N")
    realpsm = ¤u§@ªí1.Cells(2, "O")
ÂX¥R§Y¥i..

¥Îªk
¶}±Òµ{¦¡½s¿èµe­±¡A§âÀɮ׶פJ
°Ñ¦Ò¦¹ªþ¥ó
    PWControl.zip (1.73 KB)

  ¦h°µ¦h·Q¦h¾Ç²ß¡A¤Ö¬Ý¤Ö¿ù¤Ö°g³~

  ¦h°µ=¦h¦h½m²ß¡A¦h¦h½s¼g¡C
  ¦h·Q=·Q·Q¬°¤°»ò¤H®aµ{¦¡­n¨º¼Ë¼g¡A¦pªG´«¦¨¦Û¤v¡A¤S·|«ç¼g¡C
  ¦h¾Ç²ß=¾Ç²ß¤H®aªºµo°Ý¨Ã¸Ñµª¡A¾Ç²ß¤H®aªº¼gªk

  ¤Ö¬Ý=¥u¬Ý¤£°µ¤]ªPµM

TOP

        ÀR«ä¦Û¦b : ¯u¥¿ªº·R¤ß¡A¬O·ÓÅU¦n¦Û¤vªº³oÁû¤ß¡C
ªð¦^¦Cªí ¤W¤@¥DÃD