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

[µo°Ý] list µLªk³]©w

[µo°Ý] list µLªk³]©w

½Ð°Ý¦U¦ì¤j¤j
¤U¤è³Ì¤U­± ListBox3.List = opop.Value<===µ{¦¡°õ¦æ®É·|¥X²{ µLªk³]©wLIST ÄÝ©Ê
·Q½Ð°Ý¬O­þÃä¨S¦³©w¸q¨ì¶Ü??
°Ê§@
­n±N ·j´M¨ìªº­È©ñ¨ì  ListBox3
  1. .
  2. .
  3. .
  4. If ListBox1.Value = "RPR-018" Then Worksheets("RPR-018").Activate
  5. If ListBox1.Value = "NFPR-010" Then Worksheets("NFPR-010").Activate

  6. Dim opop As Range
  7. Dim NON As String
  8. Dim jjo As Long

  9. NON = ListBox1.Value
  10. jjo = ListBox2.Value
  11. Set opop = Workbooks("TEST.xlsm").Worksheets(NON).Columns("d").Cells.Find(What:=jjo, SearchDirection:=xlNext)

  12. If opop Is Nothing Then MsgBox "§ä¤£¨ì¡I": Exit Sub

  13. If Not opop Is Nothing Then
  14. ListBox3.List = opop.Value
  15. End If
½Æ»s¥N½X

test.rar (186.83 KB)

¥»©«³Ì«á¥Ñ GBKEE ©ó 2014-12-30 08:04 ½s¿è

¦^´_ 1# prince120101
  1. Private Sub ListBox2_Click()
  2.     Dim opop As Range, jjo As Long
  3.     Sheets(ListBox1.Value).Activate
  4.     jjo = ListBox2.Value
  5.     Set opop = Workbooks("TEST.xlsm").Worksheets(ListBox1.Value).Columns("d").Cells.Find(What:=jjo, SearchDirection:=xlNext)
  6.     With ListBox3
  7.         .Clear       '²M°£ ±±¨î¶µ(²M³æ¤è¶ô©Î¤U©Ô¦¡²M³æ¤è¶ô)ªº¤º®e
  8.         If opop Is Nothing Then
  9.             MsgBox "§ä¤£¨ì¡I"
  10.         ElseIf Not opop Is Nothing Then
  11.             i = 0
  12.             Do While opop.Offset(i) Like jjo & "*"  '©¹¤U²Å¦X jjo* ªº¦r¦ê
  13.                 .AddItem    '²M³æ¤è¶ô¤¤¥[¤J¤@­Ó¶µ¥Ø
  14.                 .List(.ListCount - 1, 0) = opop.Offset(i)
  15.                 i = i + 1
  16.             Loop
  17.             '³æ¿W¤@­ÓÀx¦s®æµLªk«ü©w¨ì±±¨î¶µªºList
  18.             'ListBox3.List = opop.Resize(2).Value '///¥i¥H¸Õ¸Õ¬Ý///
  19.             '¥i¥H«ü©w¨ì±±¨î¶µªº .Value
  20.             ListBox3.Value = opop.Value
  21.         End If
  22.     End With
  23. End Sub
½Æ»s¥N½X
·P®¦ªº¤ß......(¦b³Â»¶®a±Ú°Q½×°Ï.¥Î¤ß¾Ç²ß·|¦³¶i¨Bªº)
¦ý¸ê·½µL­­,«á´©¦³­­,  ¤@¤Ñ1¤¸ªºÃÙ§U,¤H¤H¦³¯à¤O.

TOP

¦^´_ 2# GBKEE

ÁÂÁ GBKEEªº¦^ÂÐ

­è´ú¸Õ«á ¥i¥HÅã¥Ü¦bListBox3ªº²M³æ¤è¶ô¤¤

¦³´X­Ó°ÝÃD·Q°Ý¤@¤U

1.
  1. With ListBox3
  2.         .Clear   
½Æ»s¥N½X
«Ü¦hµ{§Ç ¤]³£·|¥[¤J³o¼Ë²M°£ ²M³æ©Î¤U©Ô¦¡²M³æ ªº«ü¥O,¦ý­è§â.clear µù¸Ñ¤§«á µo²{®ÄªG¤@¼Ë
¬O¸ò.value & .additem ¦³Ãö«Y¶Ü?? ÁÙ¬O¥u¬O¤@­Ó²ßºD³£·|³o¼Ë¥[??

2.
  1. Do While opop.Offset(i) Like jjo & "*"
½Æ»s¥N½X
¥[¤W"*"¸¹ªí¥Ü¦¹ÃöÁä¦r«e«á¥i¯à§t¦³¹s©Î¦h­Ó¦r¤¸,­è§â & "*" µù¸Ñ¤§«á
°õ¦æ®É ·|¦b ListBox3.Value = opop.Value ¥X²{ "µLªk³]©wValueÄÝ©Ê",©Ò¥H¬O"©¹¤U·j´M²Å¦Xªº¦r¦ê"®É­Ô³£»Ý­n¥[³o"*"??

3.
  1. '³æ¿W¤@­ÓÀx¦s®æµLªk«ü©w¨ì±±¨î¶µªºList
  2.   ' ListBox3.List = opop.Resize(2).Value '///¥i¥H¸Õ¸Õ¬Ý///
  3.   '¥i¥H«ü©w¨ì±±¨î¶µªº .Value
  4.    ListBox3.Value = opop.Value
½Æ»s¥N½X
Resize(¼Æ­È) ´ú¸Õ«á §ó§ï¼Æ­Èªº¸Ü ¨º¦b ListBox3 ·|ÀHµÛ¼Æ­È¦Ó¥h§ì¨úÀx¦s®æªº­Ó¼Æ ¦p¿é¤J5 ¥¦´N¥h§ì¨ú5­ÓÀx¦s®æªº¼Ë¤l ¬O³o¼Ë¶Ü??
¦ý§Ú¤£¤ÓÀ´§Aµù¸Ñªº·N«ä @@??

4.µ{¦¡¦b°õ¦æ®É ·í¹J¨ìªÅ¥ÕÀx¦s®æ<¹Ï¤@>¥¦´N¥u·|§ì¨úªÅ¥ÕÀx¦s®æ¥H¤Wªº­È¦Ó¤w<¹Ï¤G> ¨ä¥¦­È¤£·|§ì¨ú¨ì??

1.jpg (128.64 KB)

¹Ï¤@

1.jpg

2.jpg (80.02 KB)

¹Ï¤G

2.jpg

TOP

        ÀR«ä¦Û¦b : ­ì½Ì§O¤H´N¬Oµ½«Ý¦Û¤v¡C
ªð¦^¦Cªí ¤W¤@¥DÃD