- ©«¤l
- 5923
- ¥DÃD
- 13
- ºëµØ
- 1
- ¿n¤À
- 5986
- ÂI¦W
- 0
- §@·~¨t²Î
- win10
- ³nÅ骩¥»
- Office 2010
- ¾\ŪÅv
- 150
- ©Ê§O
- ¨k
- ¨Ó¦Û
- ¥xÆW°ò¶©
- µù¥U®É¶¡
- 2010-5-1
- ³Ì«áµn¿ý
- 2022-1-23
|
¦^´_ 5# PKKO
¸ê®ÆÅçÃÒn¦p¦ó¿é¤JªÅ¥Õ,ª½±µ²MªÅ.- '** ¸ê®ÆÅçÃÒ¿ï³æ¨Ó·½
- '1 ¸ê®ÆÅçÃÒ¿ï³æ¨Ó·½¬OÀx¦s®æ¦ì¸m:¦ý»Ý¬O¬O¦P¤@¤u§@ªíªºÀx¦s®æ
- 'With Range("d2:d" & allr).Validation
- ' .Delete
- ' .Add Type:=xlValidateList, AlertStyle:=xlValidAlertStop, Operator:= _
- ' xlBetween, Formula1:="=" & Range("A2:A10").Address
- 'End With
-
- '2 ¸ê®ÆÅçÃÒ¿ï³æ¨Ó·½¥Î ","³s±µªº¦r¦ê
- With Sheets("Âà´«ªí")
- myRange = .Range("s2:s" & .Range("s65536").End(xlUp).Row) '¸ê®ÆÅçÃÒ¥Î
- End With
- '** °}¦CÂà´«¦¨¦r¦ê
-
- '** Join ¨ç¼Æ ¶Ç¦^¤@Ó¦r¦ê¡A¸Ó¦r¦ê¬O³z¹L³sµ²¬YÓ°}¦C¤¤ªº¦hÓ¤l¦r¦ê¦Ó«Ø¥ßªº¡C
- '** myRange°Ñ·ÓÀx¦s®æ¬O¬°¤Gºû°}¦C,»ÝÂন¤@ºû°}¦C¤è¥i¬°Join ¨ç¼Æ¨Ï¥Î
- 'arr = Join(Application.Transpose(myRange), ",")
-
- '** ¶]°j°é¨ú±o¦r¦ê
- 'For Each e In myRange
- ' arr = arr & "," & e
- 'Next
-
- '** Split ¨ç¼Æ ¶Ç¦^¤@Ó³¯¦C¯Á¤Þ±q¹s¶}©lªº¤@ºû°}¦C¡A¥¦¥]§t«ü©w¼Æ¥Øªº¤l¦r¦ê¡C
- '** arr = Split(Mid(arr, 2, 10000), ",") '¿ù»~ªº¥Îªk,¦]¬° arr ¶Ç¦^°}¦C,
- '** arr ¶·¬O ¦r¦ê.
-
- '************************************************
-
- With Range("d2:d" & allr).Validation
- .Delete
- .Add Type:=xlValidateList, AlertStyle:=xlValidAlertStop, Operator:= _
- xlBetween, Formula1:=Join(Application.Transpose(myRange), ",") '<- arr
- End With
½Æ»s¥N½X |
|