¼ÐÃD:
vba ÃöÁä¦r¬d¸ß¦bÂà¼g
[¥´¦L¥»¶]
§@ªÌ:
man65boy
®É¶¡:
2015-9-8 18:40
¼ÐÃD:
vba ÃöÁä¦r¬d¸ß¦bÂà¼g
¥»©«³Ì«á¥Ñ man65boy ©ó 2015-9-8 18:43 ½s¿è
¥i§_¦bÃöÁä¦r¬d¸ßbÄæ«á¡A§â¥L½s¸¹ªº¸ê®Æ¦bLabel3¤W§e²{¡A¨Ò¦p:
ListBox1ÂI¿ï«á(¿i¥úÅKªO9'*8)¡ALabel2¥X²{(¿i¥úÅKªO9'*8)¡A
Label3¥X²{(1006)¬Û¹ïªº¸ê®Æ¡A¦A«ö"Âà¼g"§âLabel2ªº¸ê®ÆÂà¼g¨ìH1Àx¦s®æùØ¡ALabel3ªº¸ê®ÆÂà¼g¨ìH2Àx¦s®æùØ¡C¦³³Ò¦Ñ®v̸ÑÃD!
³oÀɮ׬O¦b³o°Q½×°Ï¤@¦ì¦Ñ®vªº§@«~¡A¤p§Ì¾ÇÃÀ¤£ºë¡AµLªkÀ³¥Î¡C
[attach]21929[/attach]
§@ªÌ:
ã´£³¡ªL
®É¶¡:
2015-9-8 23:00
Private Sub CommandButton1_Click()
With Sheets("Sheet1")
.[H1].Value = Label2.Caption
.[H2].Value = Label3.Caption
End With
End Sub
¡@
Private Sub ListBox1_Change()
Label2.Caption = ListBox1.Column(0)
Label3.Caption = ListBox1.Column(1)
End Sub
¡@
Private Sub TextBox1_Change()
Dim i, Arr, xD, N&
If TextBox1 = "" Then GoTo 101
Arr = Sheet1.UsedRange.Columns("A:B").Cells
Set xD = CreateObject("Scripting.Dictionary")
For i = 2 To UBound(Arr)
¡@¡@If InStr(Arr(i, 2), TextBox1) Then N = N + 1: xD(N) = Array(Arr(i, 1), Arr(i, 2))
Next i
If N = 0 Then GoTo 101
ListBox1.List = Application.Transpose(Application.Transpose(xD.items))
ListBox1.Visible = True
Exit Sub
101:
Label2.Caption = "": Label3.Caption = "": ListBox1.Visible = False
End Sub
¡@
Private Sub UserForm_Initialize()
ListBox1.Visible = False
End Sub
½Æ»s¥N½X
ªþ¥ó¤U¸ü¡G
[attach]21930[/attach]
¡@
§@ªÌ:
man65boy
®É¶¡:
2015-9-9 00:06
¥»©«³Ì«á¥Ñ man65boy ©ó 2015-9-9 00:08 ½s¿è
¦^´_
2#
ã´£³¡ªL
ÁÂÁ¤j®v¯Åªºã¤j¸ÑÃD¡A§¹¥þ²Å¦X¡Aã¤j¦bª¾ÃÑ+ªºª¾ÃÑ°^Äm¡A¯u¬O¥O¤p§Ì¦n¨ØªA¡A¤§«e³£¦³¦b°lÂÜã¤jªºª¾ÃÑ¡A¼K¼K!
ã¤jªº¦W¨¥:
¡Õã´£³¡ªL¡Öª¾ÃÑ+¡DÂI¼Æ¦³¦h¦³¤Ö¡D¤½¥J´«¤£¤F¡D·Oµ½®½¤£¤F¡Dªù²¼©è¤£¤F¦h¤F´I¤£¤F¡D¤Ö¤F¦º¤£¤F¡D¾÷¤ß°l²Ö¦ó®É¤Fª¾ÃÑ+¡DÀY»Î¦³°ª¦³§C¡D¦W¤ù¦L¤£¤F¡D©ÛµP±¾¤£¤F¡D¹Ó»x¨è¤£¤F°ª¤F¶Æ¤£¤F¡D§C¤F²Û¤£¤F¡DW¤ß¿Ñ¨ú¦ó®É¤F ¡@¡×¡×¡×¡×¡×¡×¡×¡×¡×¡×¡×¡×¡×¡×¡×¡×¡×¡×¡×¡×¡×¡×¡×¡×¡×¡×¡×¡× ºw¤ô®ÄÀ³
ÁÂÁ¦Ѯv!^^
Åwªï¥úÁ{ ³Â»¶®a±Ú°Q½×ª©ª© (http://forum.twbts.com/)