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

[µo°Ý] EXCEL VBA¡D¦p¦ó¦Û°Ê¿é¤J¸ê®Æ(¥Htab¸õ¤U¤@®æ)

[µo°Ý] EXCEL VBA¡D¦p¦ó¦Û°Ê¿é¤J¸ê®Æ(¥Htab¸õ¤U¤@®æ)

§Ú¥Îªº¬O: EXCEL 2007
Àɮצb:
http://www.FunP.Net/467011
°õ¦æ®É,¶}±Ò¥¨¶°,¤£¶}³sµ²
¤º¦³3­Ósheet: ²Ä10­¶,²Ä11­¶,²Ä13­¶
§Ú¤w¸g¼g¦n¤@¬qvba,¯à¦Û°Ê¨ÌÄ渹¶ñ¤J¸ê®Æ
°ÝÃD1: ¦]­ì§@ªÌªºtab¸õ®æ³]­p¤£¨},¬G¦b§PÂ_¤W¨Ã¤£²z·Q,¾É­P¥i¯à¦³º|¿é¤Jªº®æ¤l,¸Ó¦p¦ó¦]À³?
°ÝÃD2:²Ä13­¶¤w¸g¯à¦Û°Ê¿é¤J¥Õ©³ªº®æ¤l,¶À©³®æ¤£¥Î¿é¤J,½Ð°Ý,ºñ©³®æ¬°¤U©Ô¦¡¿ï³æ,©Î¤é´Á®æ¦¡,­n«ç¼Ë¤~¯à¦Û°Ê¿é¤J?
§Ú·Q: ¹J¤U©Ô¦¡¿ï³æ,¤@«ß¿ï²Ä¤@¶µ,¹J¦~¤ë¤é,¤@«ß¶ñ99/12/31
·PÁÂ!
Symis

·PÁÂGBKEE ¶W¯Åª©¤j,±z¯uªº«Ü¾A¦X·í¦Ñ®v©Î±Ð±Â,¦b³o¸Ì¦³ÂI¤j¤~¤p¥Î,®I¨S¤H¤~°Õ!
½Ð°Ý:
1. ­Y­n°õ¦æ¥¨¶°«á,Åýµ{¦¡¦Û°Ê¿é¤J¨C¤@®æ,µ{¦¡­n«çª¾¹D­þ¤@®æ¦³¸ê®ÆÅçÃÒ²M³æ©Î¤U©Ô¦¡¿ï³æ?
2. ª¾¹D¤F¥H«á,µ{¦¡­n¦p¦ó¦Û°Ê¿ï¾Ü ¿ï³æªº²Ä¤@¶µ?
ÁÂÁÂ!
¥t¥~,(ÃD¥~¸Ü)
¤£¤j¤F¸Ñ,¬°¦ó¤@©w­n«ö¡u¦^´_¡v«ö¶s,°Ñ»PªÌ¤~¯à¦¬¨ì³qª¾? ¡u¤Þ¥Î¡v¤£¦æ¶Ü? ¡u§Ö³t¦^´_¡v¤£¦æ¶Ü?
¤@¯ë·|¥H¬°¥u­n¯d¨¥,¦³³]©w±µ¦¬³qª¾ªº¤H³£·|¦¬¨ì¤~¬O¡C
Symis

TOP

¥»©«³Ì«á¥Ñ GBKEE ©ó 2013-4-4 15:06 ½s¿è

¦^´_ 12# symis
§Aªº¹Ï¥Ü¬O¨t²Î ­n¨D§A­n§ó·s°Ñ·Ó
Àɮפ¤¦³¦WºÙ©w¸q=INVKind_13  °Ñ·Ó¨ì¨ä¥L¬¡­¶Ã¯  ->    ='C:\work\¯²µ|´î§Kªþ¥U\SampleÀÉ\[101txt_3.xlsm]²M³æ¿ï¶µ'!$D$52:$D$54






¦p»Ý¤W¶ÇÀÉ®×  ¦p¹Ï:



¸ê®ÆÅçÃÒ




¤U©Ô²M³æ  ComboBox ±±¨î¶µ

·P®¦ªº¤ß......(¦b³Â»¶®a±Ú°Q½×°Ï.¥Î¤ß¾Ç²ß·|¦³¶i¨Bªº)
¦ý¸ê·½µL­­,«á´©¦³­­,  ¤@¤Ñ1¤¸ªºÃÙ§U,¤H¤H¦³¯à¤O.

TOP

¦^´_ 14# barrykuo
Set Rng = Range("A1:C1,F1:H1,A3:C3,F3:H3,B5:B7,D5:D7,E5:E7,A8,C9:D9")
³]©wÅܼÆ="A1:C1,F1:H1,A3:C3,F3:H3,B5:B7,D5:D7,E5:E7,A8,C9:D9"³o¨Ç½d³ò
'Set Rng = Selection ³oµù¸Ñ¬O»¡©ú¤]¥i¥H: ³]©wÅܼÆ=¤u§@ªí¤W©Ò¿ï¾Üªº§@¥Î¤¤Àx¦s®æ½d³ò
·P®¦ªº¤ß......(¦b³Â»¶®a±Ú°Q½×°Ï.¥Î¤ß¾Ç²ß·|¦³¶i¨Bªº)
¦ý¸ê·½µL­­,«á´©¦³­­,  ¤@¤Ñ1¤¸ªºÃÙ§U,¤H¤H¦³¯à¤O.

TOP

  1. Set Rng = Range("A1:C1,F1:H1,A3:C3,F3:H3,B5:B7,D5:D7,E5:E7,A8,C9:D9")
  2.     'Set Rng = Selection
½Æ»s¥N½X
½Ð°ÝGBKEE¤j¤j¡A±z¼g'Set Rng = Selection·N«ä¬O¡A¦bExcel°õ¦æ¤¤¿ï¾ÜÀx¦s®æ¡A¥i¥H³]©wRngµ¥©ó¿ï©wªºÀx¦s®æ¹À¡H¦pªG§â'Set Rng = Selectionªº'¥h±¼¡C
¤H¥Í¥u¦³¤T¤Ñ¡A¥u¦³¬¡¦b¤µ¤Ñ³Ì½ñ¹ê

TOP

·PÁÂGBKEEªº±Ð¾É,
§Úº|¬Ý¥»¶K¦³²Ä2­¶,©Ò¥H¤@ª½¦bµ¥¤H¦^ÂÐ... ¯u¬O¤£¦n·N«ä!
¥t¥~§Ú¹ï©ó ¤U©Ô¿ï³æ ©M ÅçÃÒ²M³æ, ¶Ì¶Ì¤À¤£²M·¡, ½Ð°Ý¤GªÌ¦p¦ó°Ï§O? (¬Ý°_¨Ó³£¬Ocombobox ? )
¥t¥~,¹ï©ó±zªºcode,§Ú°õ¦æ«á,¥X²{¿ù»~,¹Ï¤ù¦p¤U:

(µù: ©_©Ç,¥Î¥»ºôªº¹Ï¤ù¤W¶Ç¥\¯à,³£¤£¯à¦¨¥\,¶WºC)
excelÀɮצp¤U:
http://www.funp.net/599274
Symis

TOP

¦^´_ 10# symis
¦b§AªºÀɮפ¤,¤£¬O¤U©Ô¿ï³æÀ³¬OÅçÃÒ²M³æ.
¹w³]¤u§@ªí¤¤²¾°ÊÀx¦s®æªº¨Æ¥ó
  1. Option Explicit
  2. Private Sub Worksheet_SelectionChange(ByVal Target As Range)
  3.     If Not Target.Validation Is Nothing Then Target = Split(Target.Validation.Formula1, ",")(0)
  4. End Sub
½Æ»s¥N½X
·P®¦ªº¤ß......(¦b³Â»¶®a±Ú°Q½×°Ï.¥Î¤ß¾Ç²ß·|¦³¶i¨Bªº)
¦ý¸ê·½µL­­,«á´©¦³­­,  ¤@¤Ñ1¤¸ªºÃÙ§U,¤H¤H¦³¯à¤O.

TOP

½Ð°Ý:
1. ¦b¦Û°Ê¿é¤Jªº¹Lµ{¤¤,µ{¦¡­n«çª¾¹D­þ¤@®æ¦³¤U©Ô¦¡¿ï³æ?
2. ª¾¹D¤F¥H«á,µ{¦¡­n¦p¦ó¦Û°Ê¿ï¾Ü²Ä¤@¶µ?
ÁÂÁÂ!
Symis

TOP

¦^´_ 7# symis
¤£¨Æ¥ý¹w©w­n¿é¤Jªº½d³ò
½d³ò¬O­þ¸Ì:¶·»¡©ú¤@¤U
·P®¦ªº¤ß......(¦b³Â»¶®a±Ú°Q½×°Ï.¥Î¤ß¾Ç²ß·|¦³¶i¨Bªº)
¦ý¸ê·½µL­­,«á´©¦³­­,  ¤@¤Ñ1¤¸ªºÃÙ§U,¤H¤H¦³¯à¤O.

TOP

¬OªºGBKEE ¤j,«Ü·PÁ±z
²{¦b¤S¦³¥t¤@­Ó»Ý¨D: Ãþ¦ü¹³5fªº¹Ï,¦ý¬O¨Ã¤£¨Æ¥ý¹w©w­n¿é¤Jªº½d³ò,¦Ó¬O¿é¤J²Ä¨C¤@®æ«á,«ötab¨ì¤@¤U®æ,ª½¨ì³Ì©³¤U¬°¤î¡C
³o­Ó»Ý¨D§Ú¦Û¤v·Q¤@¤U,ÁÂÁÂ!
Symis

TOP

        ÀR«ä¦Û¦b : §g¤l¥ß«í§Ó¡A¤p¤H«í¥ß§Ó¡C
ªð¦^¦Cªí ¤W¤@¥DÃD