¤ÀªR¥i¯à«ÂЪºÄæȨæbListBox¤¤Add°ß¤@È,Åý¤Hû¦n¿ï¡C
- ©«¤l
- 54
- ¥DÃD
- 7
- ºëµØ
- 0
- ¿n¤À
- 81
- ÂI¦W
- 0
- §@·~¨t²Î
- WINDOWS XP
- ³nÅ骩¥»
- OFFICE 2007
- ¾\ŪÅv
- 20
- ©Ê§O
- ¨k
- ¨Ó¦Û
- ®ç¶é
- µù¥U®É¶¡
- 2011-1-14
- ³Ì«áµn¿ý
- 2021-4-23
|
¤ÀªR¥i¯à«ÂЪºÄæȨæbListBox¤¤Add°ß¤@È,Åý¤Hû¦n¿ï¡C
AÄæ
A
A
A
B
B
B
C
C
D
E
F
F
G
¡¹Dept_Observing ¬Olist Box
ÅܼÆA ¥u¬O§PÂ_Äæ¦ìȬO§_©Mlistbox ¬Û¦Pªº¯u°²È¡C
n¥ÎVBA À³¥Î , ¦Û¤v¼g¤F¤@¬qµ{¦¡¡A¬O¬°¤F¦blist box ¥u¦C¥X³æ¤@È(A,B,C,D,E,F,G)µ¹¤Hû¤è«KÂI¿ï¡C
¦ýÁ`ı±oµ{¦¡«Üªø¡A¥i§_À°¦£Â²¤Æ©O¡H
For I = 1 To 20
A = 0
Text_Flag = Area.Cells(I, 1)
For J = 0 To Dept_Observing.ListCount - 1
If Dept_Observing.List(J) = Text_Flag Then
A = 1
Exit For
End If
Next J
If A = 0 And Text_Flag <> "" Then
Dept_Observing.AddItem Text_Flag
End If
Next I |
|
É¿ú¤£ÁÙ¡A¤~¬O¤ý¹D
|
|
|
|
|
- ©«¤l
- 128
- ¥DÃD
- 13
- ºëµØ
- 1
- ¿n¤À
- 118
- ÂI¦W
- 0
- §@·~¨t²Î
- WinXP
- ³nÅ骩¥»
- Office2003
- ¾\ŪÅv
- 50
- ©Ê§O
- ¨k
- ¨Ó¦Û
- ¥|¤t¦¨³£ÊT崃
- µù¥U®É¶¡
- 2010-9-13
- ³Ì«áµn¿ý
- 2017-5-12
|
Sub test()
Dim arr, oDic As Object, i
Set oDic = CreateObject("scripting.dictionary")
With Sheet1
arr = .Range("a1:a" & .[a65536].End(xlUp).Row)
End With
For i = 1 To UBound(arr)
oDic(arr(i, 1)) = ""
Next
Dept_Observing.List = oDic.keys
Set oDic = Nothing
End Sub |
|
¤½ªÀ¬O´Êªø«CÃÃ,ªÀû³£¬OÃäWªº¥Ê.
|
|
|
|
|
- ©«¤l
- 199
- ¥DÃD
- 45
- ºëµØ
- 0
- ¿n¤À
- 252
- ÂI¦W
- 0
- §@·~¨t²Î
- windows 7 (X64)
- ³nÅ骩¥»
- office 2010 (x64)
- ¾\ŪÅv
- 20
- ©Ê§O
- ¨k
- ¨Ó¦Û
- ®ç¶é
- µù¥U®É¶¡
- 2010-12-24
- ³Ì«áµn¿ý
- 2020-3-31
|
¥»©«³Ì«á¥Ñ linshin1999 ©ó 2011-1-16 20:15 ½s¿è
¦^´_ 1# apolloooo
Dim Text_Flag as Range
Dim sd() as integer, sd_val as integer
For Each Text_Flag In Selection
Sd_val = Asc(Text_Flag.Value)
If sd(s_val) = 0 Then
sd(s_val) = 1
Dept_Observing.AddItem Text_Flag.Value
End If
Next |
|
V98
|
|
|
|
|