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

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

¦^´_ 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

¦^´_ 23# GBKEE


    «Ü·PÁÂG¤jªº¨ó§U¸Ñµª
G¤jªº¥\¤O¯u¬O³Õ¤jºë²`
»°§Ö¨Ó¥h®ø¤Æ¤@¤U

TOP

¦^´_ 23# GBKEE


   ½Ð°ÝG¤j
§Ú­è­è¸Õ¤F¤@¤Uµ²ªG¬D¿ï²Ä2µ§¸ê®Æ®É
Label2.Captionªº²Ä¤@µ§¸ê®Æ»P²Ä¤Gµ§¸ê®Æ³£Åܦ¨¦P¤@µ§¸ê®Æ¤F

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

CARGOTEST.rar (111.32 KB) ¦U¦ì¤j¤j¦n¡G

  ª©¥D¤j¤j´£¨Ñªº¥þ¤åÀ˯Á
¥\¯à¹ê¦b¤Ó¦n¥Î¤F¡C
  ¦ý¬O¤p§Ì¦³¤@°ÝÃD¤@ª½µLªk
¬ð¯}¡A·Q½Ð¦U¦ì¤j¤jÀ°¤p§Ì¦p¦ó
§JªA¦¹¶µ°ÝÃD¡C
  ¤p§Ì¬Oª½±µ¥ÑMDB¸ê®Æ®w¨ú¥X
¤j§å¸ê®Æ¡A¦ý¬O¦bTEXTBOX1¤º
¿é¤J¸ê®Æ®É¡A·|¥X²{

°õ¦æ¶¥¬q¿ù»~13
«¬ºA¤£²Å¦X
Private Sub TextBox1_Change()

    Dim Ar()
    Dim E As Range
    Dim mSht1 As Worksheet
   
    Set mSht1 = Worksheets("TEST")   
    If TextBox1 <> "" Then
        ReDim Ar(0)
        'For Each E In mSht1.UsedRange.Columns(1).Cells
        For Each E In mSht1.Range("a1", mSht1.Range("a1:d900")).Columns(1).Cells     '´ú¸Õ¨ì 800 ªº¦ì¸m¬O OK
            If E Like "*" & TextBox1 & "*" Then
                Ar(UBound(Ar)) = E.Resize(, 4).Value
                ReDim Preserve Ar(UBound(Ar) + 1)
            End If
        Next
   
        If UBound(Ar) > 0 Then
            ReDim Preserve Ar(UBound(Ar) - 1)
            Ar = Application.Transpose(Application.Transpose(Ar))     '°õ¦æ¶¥¬q¿ù»~¡G13 «¬ºA¤£²Å¦X
            ListBox1.List = Ar
            ListBox1.Visible = True
        Else
            Label1.Caption = ""
            ListBox1.Visible = False
        End If
    Else
        Label1.Caption = ""
        ListBox1.Visible = False   
    End If   
End Sub



ÁÂÁ¦U¦ì¤j¤j¡I

TOP

¦^´_ 27# dechiuan999


    §Ú­è­è¸Õ¤F¤@¤Uµ{¦¡¨S°ÝÃD
¦n¹³§Aªº¸ê®Æ²Ä886¦C¦³°ÝÃD
§A§â886¦C§R°£¸Õ¸Õ¬Ý
¤°»ò­ì¦]§Ú¤£ª¾¹D
¥i¯à­ng¤jÀ°§A¸ÑÄÀ¤F
¤p§Ì¤~²¨¾Ç²L¥u¯àÀ°¨ì³o¸Ì¤F

TOP

¦^´_ 26# GBKEE


    ·PÁÂg¤j¤S¦AÀ°¤F§Ú¤@¦¸

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

¦^´_ 7# GBKEE
½Ð°Ý Option Compare Text ­n¥[¦b ThisWorkbook ÁÙ¬O  UserForm1 ¤º¡H

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 : ½_ÁJµ²±o¶V¹¡º¡¡A¶V·|©¹¤U««¡A¤@­Ó¤H¶V¦³¦¨´N¡A´N­n¶V¦³Á¾¨Rªº¯ÝÃÌ¡C
ªð¦^¦Cªí ¤W¤@¥DÃD