VBA¦p¦ó±N¤£¦P¸ê®Æªº°Ï°ì§ì¥X¤ÀÃþ?
- ©«¤l
- 82
- ¥DÃD
- 7
- ºëµØ
- 0
- ¿n¤À
- 112
- ÂI¦W
- 0
- §@·~¨t²Î
- WIN7
- ³nÅ骩¥»
- WIN7
- ¾\ŪÅv
- 20
- ©Ê§O
- ¨k
- µù¥U®É¶¡
- 2013-1-3
- ³Ì«áµn¿ý
- 2020-9-21
|
VBA¦p¦ó±N¤£¦P¸ê®Æªº°Ï°ì§ì¥X¤ÀÃþ?
½Ð°Ý¦U¦ìª©¤W¤j®v¡A¤p§Ìªì¾ÇVBA
«ä¦Ò¤@ÓÀÉ®×°ÝÃD¤w¸g³\¤[¡A¤]ª¦¤F«Ü¦h¤å³¹
¹Á¸Õ¥Î°j°é§ì¥X¸ê®Æ...¥¢±Ñ..
¹Á¸Õ¥Î°}¦C§ì¥X¸ê®Æ....¤]¥¢±Ñ... ·Q¤F¦n´X¤Ñ§Ë¤£¥X¨Ó
·Q½Ð°Ýª©¤W¤j¤HÌ
¦pªG§Ú·Qn§ì¨ú¤@¥÷¸ê®Æ ²Ä¤@Ósheet ¬OÁ`ªí(·|ÀHºô¶§ó·s§ì¸ê®Æ)
¦p¦ó¨Ï¥ÎVBA ±N¥L¤ÀÃþÅܦ¨ sheet2 . 3 .4 ªº¤ÀÃþ©O?
§Ú±N§Únªº¸ê®Æ°Ï°ì Åܦ¨¬õ¦âªº¦r¼Ë ¥i¥H½Ð¤H«ü¾É¶Ü?
¥t¥~³Ì«nªº´N¬O ²Ä¤@ÓÁ`ªíªº¸ê®Æ¦C¼Æ ·|ÀHµÛ¤ë¥÷¤£¦P ¦Ó¦³¼Æ¶q¤£¦P
¥t¥~ ¬O¤£¬O¯à¦b §ó²Ó¤À¦¨ sheet 4 ¸ò 5 ªººØÃþ©O??
¥t¥~§Ú¦bVBA½s¿è¾¹¨ºÃ䦳¯d¤U§Úªº·Qªk.....¦U¦ì½Ð¥Î¤OÃ@¥´...§Ú¨ì©³¬Oþ¸ÌªºÆ[©À¤£¹ï??
«ôÁ¦U¦ì¤j®v~ |
|
|
|
|
|
|
- ©«¤l
- 82
- ¥DÃD
- 7
- ºëµØ
- 0
- ¿n¤À
- 112
- ÂI¦W
- 0
- §@·~¨t²Î
- WIN7
- ³nÅ骩¥»
- WIN7
- ¾\ŪÅv
- 20
- ©Ê§O
- ¨k
- µù¥U®É¶¡
- 2013-1-3
- ³Ì«áµn¿ý
- 2020-9-21
|
|
|
|
|
|
|
- ©«¤l
- 1018
- ¥DÃD
- 15
- ºëµØ
- 0
- ¿n¤À
- 1058
- ÂI¦W
- 0
- §@·~¨t²Î
- win7 32bit
- ³nÅ骩¥»
- Office 2016 64-bit
- ¾\ŪÅv
- 50
- ©Ê§O
- ¨k
- ¨Ó¦Û
- ®ç¶é
- µù¥U®É¶¡
- 2012-5-9
- ³Ì«áµn¿ý
- 2022-9-28
|
¦^´_ 10# handsometrowa
EXCEL¤£¯à¶i¶¥¿z¿ï«á¶K¨ì§Oªº¤u§@ªí¡A¥i¬OVBA¥i¥H?
|
|
|
|
|
|
|
- ©«¤l
- 82
- ¥DÃD
- 7
- ºëµØ
- 0
- ¿n¤À
- 112
- ÂI¦W
- 0
- §@·~¨t²Î
- WIN7
- ³nÅ骩¥»
- WIN7
- ¾\ŪÅv
- 20
- ©Ê§O
- ¨k
- µù¥U®É¶¡
- 2013-1-3
- ³Ì«áµn¿ý
- 2020-9-21
|
¦^´_ 9# GBKEE
Dear GBKEE §Ú¤w¸g¸Ñµª¥X¨Ó¤F ÁÂÁ±zªº«ü¾É §Ú¤Wºô§ä¨ìµª®×¤F..¥¿¦b·Ð´o§Ú¨S¿ìªk¤U¸ü H µ¹ªº¨ºÓµe¹Ïµ{¦¡ ¸Ó«ç»ò¸òª©¤Í̸ÑÄÀ¿z¿ï¶K¹L¥hªº°ÝÃD
«·sµo¤@½g¤å³¹¦n¤F¡AÁÂÁ±zªº«ü¾É¡A¶V¨Ó¶V²M·¡¾ãÓ¬yµ{¤F¡C |
|
|
|
|
|
|
- ©«¤l
- 82
- ¥DÃD
- 7
- ºëµØ
- 0
- ¿n¤À
- 112
- ÂI¦W
- 0
- §@·~¨t²Î
- WIN7
- ³nÅ骩¥»
- WIN7
- ¾\ŪÅv
- 20
- ©Ê§O
- ¨k
- µù¥U®É¶¡
- 2013-1-3
- ³Ì«áµn¿ý
- 2020-9-21
|
¦^´_ 9# GBKEE
Dear GBKEE
·PÁ±z¤§«eµ¹ªºµ{¦¡½X¡A°µ¥X¨ÓªºªF¦è²Å¦X§ÚnªºªF¦è¡A¦ý¬O«áÄòÁÙ¥i¯àn²K¥[¦Û°Êpºâ
§Ú¤µ¤Ñ§â¾ãÓµ{¦¡¤À¶}¬Ý¤F¤@¤U¡A¦b¦Û°Ê¿z¿ïªº¦a¤è §Ú¯uªº§¹¥þ¤£¤F¸Ñ¡A§Ú¤µ¤Ñ¥hEXCEL ¬Ý¤F»¡©ú
¦b©w¸q¤@Ó½d³ò¦WºÙ¤]¦n¡A¿ï¨ú¤@Ó½d³ò¤]¦n¡A¦b¨Ï¥Î¶i¶¥¿z¿ïªº®ÉÔ¡Aµ¹¤©·Ç«h¨Ã¥B½Æ»s¨ì¬YÓ¦a¤èªº®ÉÔ..
¥L³£¥u¯à¦b¦P¤@Ó¤u§@ªí¤W±¨Ï¥Î¿z¿ï«áªº·Ç«h±ø¥ó½Æ»s¨Ã¥B¶K¤W¡A¤£¯à¸ó¤u§@ªí¶K¤Wªü@@"
¥i¬O§Ú¤µ¤Ñ¥Î¤F±ø¦C¦¡°»¿ù¶]µ{¦¡¡A¥i¬O±z¤@¶}©l¸ê®Æ®w©w¸q§¹¤§«á¡A´N¥i¥H§â¿z¿ï¹L«áªº¸ê®Æ¶K¨ì"¶RÅv"©Î¬O"½æÅv" ªº¤u§@ªí¸Ì±
µM«á¦A¶i¦æ¶i¤@¨Bªº¿z¿ï¡AµM«á¦A¶K¤W¨ì·s¼W¥[ªº¦WºÙ¤u§@ªí¤W
³o¯uªº¦Ê«ä¤£±o¨ä¸Ñªü!! EXCEL¤£¯à¶i¶¥¿z¿ï«á¶K¨ì§Oªº¤u§@ªí¡A¥i¬OVBA¥i¥H?
PS:¨ä¹ê±zÀ°§Ú³]pªºµ{¦¡ "¶RÅv"¸ò"½æÅv" ¥i¥H»Ýn¥i¥H¤£n¡A"¤ÀÃþ¤@"¨ºÓ¬O·íªì¸ÑÄÀ¥Î¨ä¹ê¤£¥Î¨ºÓ¤u§@ªí¤F¡Aµù°Oµ{¦¡½X¤§«á¥i¥HÄ~Äò¹B¦æ¡A·PÁÂ^^ |
|
|
|
|
|
|
- ©«¤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
|
¥»©«³Ì«á¥Ñ GBKEE ©ó 2013-6-7 15:56 ½s¿è
¦^´_ 8# handsometrowa
¸ò¤@¶}©l³¯z°}¦CÅܼƨº¤Óªº¦WºÙ¨S¦³Ãö«Yªº*¦¨¥æ¶q *¥¼¨R¾P -> ¸ê®Æ®wÄæ¦ì¦WºÙ¤£¥i¥H¦³ * ,¥h±¼*ªº§@¥Î¦Ó¤w. 1#»¡:§Ú·Qn§ì¨ú¤@¥÷¸ê®Æ ²Ä¤@Ósheet ¬OÁ`ªí(·|ÀHºô¶§ó·s§ì¸ê®Æ)
¦p¦ó¨Ï¥ÎVBA ±N¥L¤ÀÃþÅܦ¨ sheet2 . 3 .4 ªº¤ÀÃþ©O?
§Ú¥Î¤F [¶i¶¥¿z¿ï]ªº¤èªk- AdvancedFilter ¤èªk [¶i¶¥¿z¿ï]
- ½Ð°Ñ¾\®M¥Î¦Ü½d¨Ò¯S©w°ò©ó·Ç«h½d³ò±q¸ê®Æ²M³æ¤¤¿z¿ï©Î½Æ»s¸ê®Æ¡C¦pªGªì©l¿ï©w¬°³æÓÀx¦s®æ¡A«h¨Ï¥ÎÀx¦s®æ¥Ø«eªº°Ï°ìx¬°Variant¡C
- expression.AdvancedFilter(Action, CriteriaRange, CopyToRange, Unique)
- expression ¥²¿ï¡C¸Ó¹Bºâ¦¡·|¶Ç¦^ [®M¥Î©ó] ²M³æ¤¤ªº¨ä¤¤¤@Óª«¥ó¡C
- Action ¥²¿ïªº XlFilterAction ¸ê®ÆÃþ«¬¡C
- XlFilterAction ¥i¥H¬O³o¨Ç XlFilterAction ±`¼Æ¤§¤@¡CxlFilterCopy ,xlFilterInPlace.
- CriteriaRange ¿ï¾Ü©Êªº Variant¡C·Ç«h½d³ò¡C¦pªG¬Ù²¤¦¹¤Þ¼Æ«hµL·Ç«h¡C
- CopyToRange ¿ï¾Ü©Êªº Variant¡C¦pªG Action ¬° xlFilterCopy¡A¦¹¤Þ¼Æ«ü©w³Q½Æ»s¦Cªº¥Ø¼Ð½d³ò¡C§_«h©¿²¤¦¹¤Þ¼Æ¡C
- Unique ¿ï¾Ü©Êªº Variant¡CY¬° True¡A«h¶È¿z¿ï°ß¤@ªº°O¿ý¡FY¬° False¡A«h¿z¿ï¥X©Ò¦³²Å¦X·Ç«hªº°O¿ý¡C¹w³]Ȭ° False¡C
½Æ»s¥N½X [¿ï¾ÜÅvÁ`ªí] ¬°¸ê®Æ®w¥H¤U¬°¥¦ªºÄæ¦ì¦WºÙ
«´¬ù ¨ì´Á¤ë¥÷ ¼i¬ù»ù ¶R½æÅv ¶}½L»ù ³Ì°ª»ù ³Ì§C»ù ³Ì«á µ²ºâ»ù º¦¶^»ù º¦¶^% *¦¨¥æ¶q *¥¼¨R¾P ³Ì«á³Ì¨Î¶R»ù ³Ì«á³Ì¨Î½æ»ù ¾ú¥v³Ì°ª»ù ¾ú¥v³Ì§C»ù
[¿ï¾ÜÅvÁ`ªí]¤¤«ü©wn¿z¿ïªºÄæ¦ì,¥Î AR = Array("¨ì´Á¤ë¥÷", "¼i¬ù»ù", "¶R½æÅv", "¦¨¥æ¶q", "¥¼¨R¾P«´¬ù¶q") ,¤@¦¸ªº½Æ»s¨ì
sheet2 . 3 .4 ¤¤,«K©óAdvancedFilterªº¿z¿ï. |
|
|
|
|
|
|
- ©«¤l
- 82
- ¥DÃD
- 7
- ºëµØ
- 0
- ¿n¤À
- 112
- ÂI¦W
- 0
- §@·~¨t²Î
- WIN7
- ³nÅ骩¥»
- WIN7
- ¾\ŪÅv
- 20
- ©Ê§O
- ¨k
- µù¥U®É¶¡
- 2013-1-3
- ³Ì«áµn¿ý
- 2020-9-21
|
·PÁÂGBKEE ~§ÚÀ´¤F ¦ý¬O¥i§_¦A´£°Ý¤@Ó°ÝÃD
³oÓArray ("¦¨¥æ¶q", "¥¼¨R¾P«´¬ù¶q") ¸ò¤@¶}©l³]©wªº¨ºÓAR = Array("¨ì´Á¤ë¥÷", "¼i¬ù»ù", "¶R½æÅv", "¦¨¥æ¶q", "¥¼¨R¾P«´¬ù¶q") ¦³ÃöÁp¶Ü? §Ú·Q§Ú¬O³oÓ¦a¤è¥X°ÝÃD ¨Ì·Ó±zªº·Qªk¡A
.[L4] ="¦¨¥æ¶q"
.[M4]= "¥¼¨R¾P«´¬ù¶q") ¥u¬O§âRange("L4") ½áÈÅܦ¨ ¤å¦rÀÉ ¦Ó¤w
©Ò¥H¸ò¤@¶}©l³¯z°}¦CÅܼƨº¤Óªº¦WºÙ¦³Ãö«Y¶Ü?
.[L4:M4] = Array("¦¨¥æ¶q", "¥¼¨R¾P«´¬ù¶q")
µ¥¦P
.[L4] ="¦¨¥æ¶q"
.[M4]= "¥¼¨R¾P«´¬ù¶q") |
|
|
|
|
|
|
- ©«¤l
- 82
- ¥DÃD
- 7
- ºëµØ
- 0
- ¿n¤À
- 112
- ÂI¦W
- 0
- §@·~¨t²Î
- WIN7
- ³nÅ骩¥»
- WIN7
- ¾\ŪÅv
- 20
- ©Ê§O
- ¨k
- µù¥U®É¶¡
- 2013-1-3
- ³Ì«áµn¿ý
- 2020-9-21
|
Dear ª©¤j
§Ú³Ìªñ¦b©é©Rªº²Îp¸ê®Æªü §Ú¹J¨ìÃøÃD¤F ¥i¤£¥i¥H½Ð°Ý±z(¦]¬°§ÚÁÙ¤£°÷Åv µoµu°T)
±z±Ð¾É§Úªºµ{¦¡½X·í¤¤
Sub Main()
AR = Array("¨ì´Á¤ë¥÷", "¼i¬ù»ù", "¶R½æÅv", "¦¨¥æ¶q", "¥¼¨R¾P«´¬ù¶q")§ÚÀ´
With Sheets("¿ï¾ÜÅvÁ`ªí")§ÚÀ´
.[L4:M4] = Array("¦¨¥æ¶q", "¥¼¨R¾P«´¬ù¶q") ¦³ÂI¤£À´¡A³o¥y¸Üªº·N«ä¬O§â°}¦CÅܼƤ¤ªº³o¨âÓÅܼƽáȵ¹ [L4:M4] ? ¤£¬OÀ³¸Ó¬Û¤Ï?? '"*¦¨¥æ¶q" ,"*¥¼¨R¾P'¸ê®Æ®wÄæ"*" ¶i¶¥¿z¿ï¦³·|¦³¿ù»~
Set Rng = .Range("B4" & .[B4].End(xlDown).Row) '¸ê®Æ®w ³oÓ¸ê®Æ®w½d³ò©w¸q§ÚÀ´
¿z¿ïµ{¦¡ "¤ÀÃþ¤@" ¨º³oÓ ¿z¿ïµ{¦¡ ¥H¤U³o¤TÓ ¤ÀÃþ¤@ ½æÅv ¶RÅv ?? ³o¬O¤°»ò«ü¥O call?©I¥s? §Ú¬Ý¥L¤£¬Oª`¸Ñ À³¸Ó¨Æ·|°õ¦æªºµ{¦¡§a?
¿z¿ïµ{¦¡ "½æÅv"
¿z¿ïµ{¦¡ "¶RÅv" |
|
|
|
|
|
|
- ©«¤l
- 82
- ¥DÃD
- 7
- ºëµØ
- 0
- ¿n¤À
- 112
- ÂI¦W
- 0
- §@·~¨t²Î
- WIN7
- ³nÅ骩¥»
- WIN7
- ¾\ŪÅv
- 20
- ©Ê§O
- ¨k
- µù¥U®É¶¡
- 2013-1-3
- ³Ì«áµn¿ý
- 2020-9-21
|
¦^´_ 4# GBKEE
¦A¦¸«ôÁÂ!!
±z¯uªº¬OÀ°¤F«Ü¤jªº¦£¡A®³¨ì³o¥÷µ{¦¡½Xªº®ÉÔ¡A¤º¤ß¬O¤S·P°Ê¡A¤S²Û·\..
§Æ±æ¦³´Â¤@¤é¦ÂI§¹¦¨§ÚªºªF¦è ¥i¥HÀ°¦£§ó¦h¤H
·PÁª©¥D~ |
|
|
|
|
|
|