- ©«¤l
- 49
- ¥DÃD
- 8
- ºëµØ
- 0
- ¿n¤À
- 63
- ÂI¦W
- 0
- §@·~¨t²Î
- windows XP
- ³nÅ骩¥»
- Office 2003
- ¾\ŪÅv
- 20
- ©Ê§O
- ¤k
- ¨Ó¦Û
- °ª¶¯
- µù¥U®É¶¡
- 2013-4-8
- ³Ì«áµn¿ý
- 2013-10-30

|
¦³¨âÓListBox, ¤@Ó¬O³æ¸¹(ListBox2), ¤@Ó¬O³æ¸¹©ú²Ó(ListBox1),³£¥i¥H½Æ¿ï, ½Ð¸Ôªþ¥ó
ListBox°ÝÃD(2).zip (23.22 KB)
·Q½Ð°Ýª©¤W°ª¤â, ListBox2ªºµ{¦¡¬O§_¦³§ó¦nªº¼gªk?
§Ú¥Ø«e¼gªk¬O:
Private Sub ListBox2_Change()
Dim lrow, irow, ai As Integer
Sheets("login").ListBox1.Clear
[A9:E19] = ""
With ListBox2
For lrow = 0 To .ListCount - 1
If .Selected(lrow) Then
With Sheets(Sh)
ai = 2
Do While .Cells(ai, "A") <> ""
If .Cells(ai, "A") = ListBox2.List(lrow, 0) Then
With ListBox1
.AddItem
irow = .ListCount
.List(irow - 1, 0) = Sheets(Sh).Cells(ai, "A")
.List(irow - 1, 1) = Sheets(Sh).Cells(ai, "B")
.List(irow - 1, 2) = Sheets(Sh).Cells(ai, "C")
.List(irow - 1, 3) = Sheets(Sh).Cells(ai, "D")
.List(irow - 1, 4) = Sheets(Sh).Cells(ai, "E")
End With
End If
ai = ai + 1
Loop
End With
End If
Next
End With
Application.EnableEvents = True
End Sub |
|