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

[µo°Ý] VBA TextBox ¿é¤J§Q¥ÎVlookupÅýLabel Åã¥Ü¼Æ­È°ÝÃD

[µo°Ý] VBA TextBox ¿é¤J§Q¥ÎVlookupÅýLabel Åã¥Ü¼Æ­È°ÝÃD

¦U¦ì¤j¤j¦n
¤p§Ì¦³¤@¨Æ·Q½Ð±Ð
¤p§Ì¥ÎVBA TextBox ¿é¤J¼Æ­È
·QÅýLabel8 ªºCaption Åã¥Ü
¨Ï¥Î¤½¦¡Application.WorksheetFunction.VLookup
¦ý¥u­nKey in¤@­Ó¼Æ¦r´N·|¥X²{¿ù»~
¦ý¥Î¶K¤Wªº´N¤£·|¦³¿ù
·|¤£·|¬O TextBox¥u·|°õ¦æ¤@¦¸??
¤p§Ì¹Á¸Õ¨Ï¥Î Do while loop¥h¼g¤]¬O¿ù»~
½Ð°Ý¦³¸Ñ¶Ü?
¥I¤W¤p§Ì¼gªºµ{¦¡
Private Sub TextBox3_Change()
Do While Label8.Caption <> ""
On Error GoTo EH:
Label8.Caption = Application.WorksheetFunction.VLookup(TextBox3.Text, Sheets("ITM").Range("C3:D7639"), 2, False)
Label11.Caption = Application.WorksheetFunction.VLookup(TextBox3.Text, Sheets("ITM").Range("C3:F7639"), 4, False)
EH:
Label8.Caption = ""
Label11.Caption = ""
Loop
End Sub

¥»©«³Ì«á¥Ñ minture3 ©ó 2015-4-9 14:52 ½s¿è

¦^´_ 1# fantersy

¸Õ¸Õ¬Ý³o¼Ë!!
­è¸Õ¤F¤@¤U ¥Î³o­Ó¤è¦¡ªº¸Ü¨C¥´¤@­Ó¦r´N·|·j´M¤@¦¸
¸ê®Æµ§¼Æ¦pªG«Ü¦hªº¸Ü ¤£ª¾¹D·|¤£·|°õ¦æ³t«×«ÜºC
    Private Sub TextBox1_Change()
On Error GoTo EH:
X = Application.WorksheetFunction.VLookup(TextBox1.Text, Sheets("sheet1").Range("A1:C7"), 2, False)
Y = Application.WorksheetFunction.VLookup(TextBox1.Text, Sheets("sheet1").Range("A1:C7"), 3, False)
EH:
Label1.Caption = X
Label2.Caption = Y
End Sub

TOP

¥Î³oEXIT¨Æ¥ó
Private Sub TextBox1_Exit(ByVal Cancel As MSForms.ReturnBoolean)

TOP

¦^´_ 3# lpk187
§ï¦¨EXIT´N¤£·|¦³§Ú¤W­±¨º­Ó°ÝÃD¤F!!
·PÁÂ!!
­è¦n³o¤]¬O§Ú»Ý­nªº!!

TOP

¥Î³oEXIT¨Æ¥ó
Private Sub TextBox1_Exit(ByVal Cancel As MSForms.ReturnBoolean)
lpk187 µoªí©ó 2015-4-9 15:23



    ¥i¥H¥Î¤F~¤Ó·PÁ§A¤F
¥u¤£¹L¨í¸¹¸Ì­±ªºªF¦è¬Ý¤£¬O«ÜÀ´...­n¦A¬ã¨s¤@¤U~·P®¦¤j¤j

«á¨Ó§Ú¥Î
Label23.Caption = Application.IfError(Application.VLookup(TextBox8.Text, Sheets("ITM").Range("C3:F7639"), 4, False), "")
¥[¤FIferror¦b¸Ì­±¤]¬O¥i¥H
¥u¤£¹L¦n¹³¥u¦³­­©w­n2003ª©¥H¤W¤~¦æ....
¤j¤jªº¤è¦¡¯uªº«ÜÆg~·P®¦!!

TOP

        ÀR«ä¦Û¦b : µoµÊ®ð¬Oµu¼ÈªºµoºÆ¡C
ªð¦^¦Cªí ¤W¤@¥DÃD