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

[µo°Ý] ¥i¦Û©wªí³æ ¥þ¤åÀ˯Á?

¦^´_ 2# register313
¥i¦p¦¹


¥þ¤åÀ˯Á.rar (499.19 KB)

TOP

¦^´_ 5# user999
¨Ï¥Î  Option Compare ³¯­z¦¡  ¦b¼Ò²Õ¼h¦¸¤¤¥Î¨Ó«Å§i·í¤ñ¸û¦r¦ê¸ê®Æªº¤ñ¹ï¤è¦¡.
½Ð¦bªí³æ¼Ò²Õ³»ºÝ ¥[¤W Option Compare Text    ¥i¥H¤£¤À¤j¤p¼g¨Ó¤ñ¹ï

TOP

¦^´_ 10# dafa
2Ä椰»ò? ½Ð¤W¶Ç½d¨Ò

TOP

¦^´_ 12# dafa
§A¤£°µ­Ó½d¨Ò¤W¶Ç,¯uªº¤£ª¾­n¦p¦ó¦^µª.

TOP

¦^´_ 14# dafa
  1. Private Sub UserForm_Initialize()
  2.      With ListBox1
  3.         .Visible = False
  4.         .ColumnCount = 4                '«ü©w¤U©Ô¦¡²M³æ¤è¶ô©Î²M³æ¤è¶ôªºÅã¥Ü¦æ¼Æ¡C
  5.         .ColumnWidths = "370,40,40,40"  '«ü©w¦h¦æ¤U©Ô¦¡²M³æ¤è¶ô©Î²M³æ¤è¶ô¤¤ªº¦U¦æ¼e«×¡C
  6.     End With
  7. End Sub
  8. Private Sub ListBox1_Change()
  9.     AA = Application.Index(ListBox1.List, ListBox1.ListIndex + 1)  '°}¦C¤¤©â¥X«ü©wªº¤¸¯À°}¦C(³o¸Ì¬O¤@ºû°}¦C)
  10.     Label2.Caption = "[" & Join(AA, "] ; [") & "]"                  'Join µ²¦X¤@ºû°}¦Cªº¤å¦r
  11. End Sub
  12. Private Sub TextBox1_Change()
  13.     Dim Ar(), E As Range
  14.     If TextBox1 <> "" Then
  15.         ReDim Ar(0)
  16.         For Each E In Sheet1.UsedRange.Columns(1).Cells
  17.             If E Like "*" & TextBox1 & "*" Then
  18.                 Ar(UBound(Ar)) = E.Resize(, 4).Value
  19.                 ReDim Preserve Ar(UBound(Ar) + 1)
  20.             End If
  21.         Next
  22.         If UBound(Ar) > 0 Then
  23.             ReDim Preserve Ar(UBound(Ar) - 1)
  24.             Ar = Application.Transpose(Application.Transpose(Ar))
  25.             ListBox1.List = Ar
  26.             ListBox1.Visible = True
  27.         Else
  28.             Label2.Caption = ""
  29.             ListBox1.Visible = False
  30.         End If
  31.     Else
  32.         Label2.Caption = ""
  33.         ListBox1.Visible = False
  34.     End If
  35. End Sub
½Æ»s¥N½X

TOP

¦^´_ 17# dafa
  1. If E Like "*" & TextBox1 & "*" Then     
  2.                 Ar(UBound(Ar)) = E.Resize(, 4).Value  '***¤@ºû°}¦CAr ¥[¤J¤l¤¸¯À -> E.Resize(, 4).Value  ¡°¦¹¤l¤¸¯À ¬O¬°( 1, 4 )¤Gºû°}¦C                 ReDim Preserve Ar(UBound(Ar) + 1)
½Æ»s¥N½X
  1. If UBound(Ar) > 0 Then
  2.             ReDim Preserve Ar(UBound(Ar) - 1)
  3.             'Ar = Application.Transpose(Application.Transpose(Ar))
  4.             Ar = Application.Transpose(Ar) '²Ä¤@¦¸Âà¸m  ±o¨ìªº¬O ¾ãÄæ¸ê®Æ
  5.             Ar = Application.Transpose(Ar) '²Ä¤G¦¸Âà¸m ±o¨ìªº¬O  ¾ã¦C¸ê®Æ   
½Æ»s¥N½X

TOP

¦^´_ 19# dafa
  1. Private Sub UserForm_Initialize()
  2.      With ListBox1
  3.         .MultiSelect = fmMultiSelectMulti   '=> 1  :  ListBox1Äݩʳ]©w¥i½Æ¿ï
  4.        ' fmMultiSelectSingle 0 ¥u¯à¿ï¨ú¤@­Ó±M®× ( ¹w³] )¡C
  5.        ' fmMultiSelectSimple 1 «ö¤UªÅ¥ÕÁä©Î«ö¤U·Æ¹«Áä¡A¥i¥H¿ï¨ú¡B¨ú®ø¿ï¨ú²M³æ¤¤ªº±M®×¡C
  6.        '  fmMultiSelectExtended 2 «ö¤U SHIFT ¨Ã«ö¤U·Æ¹«Áä¡A©Î«ö¤U SHIFT ¨Ã«ö¤U¤@­Ó¤è¦VÁä¡A¥i¿ï¨ú¤@­Ó½d³ò¤ºªº©Ò¦³±M®×¡C«ö¤U CTRL ¨Ã«ö¤U·Æ¹«Áä¡A¥i¿ï¨ú©Î¨ú®ø¿ï¨ú¤@­Ó±M®×¡C

  7.         .Visible = False
  8.         .ColumnCount = 4                '«ü©w¤U©Ô¦¡²M³æ¤è¶ô©Î²M³æ¤è¶ôªºÅã¥Ü¦æ¼Æ¡C
  9.         .ColumnWidths = "370,40,40,40"  '«ü©w¦h¦æ¤U©Ô¦¡²M³æ¤è¶ô©Î²M³æ¤è¶ô¤¤ªº¦U¦æ¼e«×¡C
  10.     End With
  11. End Sub
  12. Private Sub ListBox1_Change()
  13.     Dim xlString  As String, AA(), xi As Integer
  14.     With ListBox1
  15.         For xi = 0 To .ListCount - 1
  16.             If .Selected(xi) = True Then
  17.                 AA = Application.Index(ListBox1.List, ListBox1.ListIndex + 1)  '°}¦C¤¤©â¥X«ü©wªº¤¸¯À°}¦C(³o¸Ì¬O¤@ºû°}¦C)
  18.                 xlString = IIf(xlString = "", "[" & Join(AA, "] ; [") & "]", xlString & Chr(10) & "[" & Join(AA, "] ; [") & "]")
  19.             End If
  20.         Next
  21.     End With
  22.     Label2.Caption = xlString
  23. End Sub
½Æ»s¥N½X

TOP

¦^´_ 25# dafa
©êºp¤F
  1. Private Sub ListBox1_Change()
  2.     Dim xlString  As String, AA(), xi As Integer
  3.     With ListBox1
  4.         For xi = 0 To .ListCount - 1
  5.             If .Selected(xi) = True Then
  6.                 AA = Application.Index(ListBox1.List, xi + 1)   '***³o¸Ì¨S­×§ï    °}¦C¤¤©â¥X«ü©wªº¤¸¯À°}¦C(³o¸Ì¬O¤@ºû°}¦C)
  7.                 xlString = IIf(xlString = "", "[" & Join(AA, "] ; [") & "]", xlString & Chr(10) & "[" & Join(AA, "] ; [") & "]")
  8.             End If
  9.         Next
  10.     End With
  11.     Label2.Caption = xlString
  12. End Sub
½Æ»s¥N½X

TOP

¥»©«³Ì«á¥Ñ GBKEE ©ó 2012-6-3 10:01 ½s¿è

¦^´_ 27# dechiuan999
½Æ»s test ¤u§@ªí ·|¦³µª®×ªº
³]­q mSht1=½Æ»sªº¤u§@ªí  ¥i¥¿±`¹B§@   

For Each E In mSht1.Range("a1", mSht1.Range("a1:d900")).Columns(1).Cells     '´ú¸Õ¨ì 800 ªº¦ì¸m¬O OK
-> For Each E In  mSht1.Range("a1:d900").Columns(1).Cells

TOP

¦^´_ 31# c_c_lai
Option Compare ³¯­z¦¡¥²¶·¥X²{¦b¼Ò²ÕùØ¡A¥B¥²¶·¦b¥ô¦óµ{§Ç¤§«e¡C
§Aªºµ{¦¡½X¦b¨º¸Ì ¨º¸Ìªºµ{§Ç¦pªG¦³ Option Compare  ªº³]©w¬°¥D

TOP

        ÀR«ä¦Û¦b : ¡i°µ¤Hªº¶}©l¡j¨C¤@¤Ñ³£¬O¬G¤Hªº¶}©l¡A¨C¤@­Ó®É¨è³£¬O¦Û¤vªºÄµ±§¡C
ªð¦^¦Cªí ¤W¤@¥DÃD