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

[µo°Ý] listbox rowsource¥Îªk

¦^´_ 6# n7822123
§Ú«á¨Ó¦³¸Õ¹L
Set Rng = Worksheets("Sheet1").Range("D2:D100, F2:F100").SpecialCells(xlCellTypeVisible)
¦ý¦n¹³¤£¯à³o¼Ë¼g

TOP

¦^´_ 8# singo1232001
¤j¤j¦n±j¡A¨ü¯q¨}¦h

TOP

¥»©«³Ì«á¥Ñ n7822123 ©ó 2021-7-18 14:47 ½s¿è

¦^´_ 10# wang077


¥u¬O¤@­ÓÂú«¬½}¤F¡A§A¨Sµ¹­ì©l¸ê®Æ¡A¨S¤Hª¾¹D§A¬O«ç»òªÅ¥Õ¡A«ç»ò¦X¨ÖÀx¦s®æªº

§Aªº°ÝÃD¦b©ó¡A­n¥ý°µ¸ê®Æ¾ã²z¡A¤~¯à¶ë¤J Listbox

­«ÂI¦b©ó¸ê®Æ¾ã²z¡A¦Ó¤£¬O«ç»ò¶ë¤J ListBox

µ{¦¡¬O¨Ì»Ý¨D¼gªº¡A»Ý¨Dªí¹F¤£²M·¡
©ÎªÌ¨S¦³¤W¶Çªþ¥ó¡A·R²ö¯à§U

TOP

¥»©«³Ì«á¥Ñ n7822123 ©ó 2021-7-18 15:26 ½s¿è

¦^´_ 10# wang077


ª¼¼gµ¹§A¡A½Ð´ú¸Õ¡A¦pªGµ{¦¡¥X¿ù¡A½Ðµ¹­Ó­ì©l¸ê®Æ§a!

¤£ª¾¹D§Aªº­ì©l¸ê®Æ¡AÁÙ­n¼gVBAµ¹§A

¨º¤w¸g¤£¬OVBA§Þ³N°ÝÃD¤F¡A¬O¦b¦ÒÅç²q´ú¯à¤O!



Dim Arr, Brr(), R%, K%
'­ì©l¸ê®Æ¤J°}¦CArr
With Sheets("sheet1")
  Arr = Range(.[D2], .Cells(Rows.Count, "F").End(3))
End With
'¾ã²z¸ê®Æ¡AArr=>Brr
For R = 1 To UBound(Arr)
  If Arr(R, 1) <> "" And Arr(R, 3) <> "" Then  '±Æ°£D¡BF¦CªÅ¥Õ
    K = K + 1: ReDim Preserve Brr(1 To 2, 1 To K)
    Brr(1, K) = Arr(R, 1): Brr(2, K) = Arr(R, 3)
  End If
Next R
Brr = Application.Transpose(Brr)
'¶ë¤J¸ê®Æ Brr => ListBox
With ListBox1
  .List = Brr
  .ColumnCount = UBound(Brr, 2)
End With
µ{¦¡¬O¨Ì»Ý¨D¼gªº¡A»Ý¨Dªí¹F¤£²M·¡
©ÎªÌ¨S¦³¤W¶Çªþ¥ó¡A·R²ö¯à§U

TOP

¦^´_ 14# n7822123
©êºp¡A¦b¦¹ªþ¤WÀÉ®×
¦]¬°¦³¿z¿ï¡A©Ò¥H¥Î¤FSpecialCells(xlCellTypeVisible)
test.zip (38.89 KB)

TOP

¥»©«³Ì«á¥Ñ singo1232001 ©ó 2021-7-18 21:21 ½s¿è

¦^´_ 15# wang077


    §Ú¥Î¦r¨å·f°t´ú¸Õ  ¥i°Ñ¦Ò

test_v1.zip (41.71 KB)

TOP

¥»©«³Ì«á¥Ñ n7822123 ©ó 2021-7-18 22:33 ½s¿è

¦^´_ 15# wang077


³o¼Ë¶Ü?



test+.rar (38.18 KB)
µ{¦¡¬O¨Ì»Ý¨D¼gªº¡A»Ý¨Dªí¹F¤£²M·¡
©ÎªÌ¨S¦³¤W¶Çªþ¥ó¡A·R²ö¯à§U

TOP

¥»©«³Ì«á¥Ñ n7822123 ©ó 2021-7-18 23:03 ½s¿è

¦^´_ 17# n7822123


¤W¤@­ÓµoªºÀɮצ³Bug¡A¥Î³o­Ó§a

°ò¥»¤W§Aªº¿z¿ï¡A¹ï¸ê®Æ¾ã²z¨S¤°»òÀ°§U~~

¤U¦¸°O±o¦­ÂI©ñ¤WÀɮסA´N¤£¥Îªá³o»ò¦h®É¶¡Âç²M¤F




test+2.rar (39.79 KB)
µ{¦¡¬O¨Ì»Ý¨D¼gªº¡A»Ý¨Dªí¹F¤£²M·¡
©ÎªÌ¨S¦³¤W¶Çªþ¥ó¡A·R²ö¯à§U

TOP

¦^´_ 16# singo1232001
·PÁ¤j¤jÀ°¦£

TOP

¦^´_ 18# n7822123
¦nªº¡A©êºp¡A²¨©¿¤F
ÁÂÁ¤j¤jªºÀ°¦£¡B±Ð¾É

TOP

        ÀR«ä¦Û¦b : ¥Ç¿ù¥XÄb®¬¤ß¡A¤~¯à²M²bµL·Ð´o¡C
ªð¦^¦Cªí ¤W¤@¥DÃD