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

[µo°Ý] ¬¡­¶Ã¯¤Àªù§OÃþ

[µo°Ý] ¬¡­¶Ã¯¤Àªù§OÃþ

¥»©«³Ì«á¥Ñ mark15jill ©ó 2011-6-17 17:13 ½s¿è

¦]¤§«e¦³µo©« ¦ý¬O¦n¹³»¡ªº¤£¬O«Ü²M·¡ ¨S¤H¦^À³(ÁÙ¬O¦³¬ÛÃöÃþ«¬ªº©«!?
©Ò¥H §ï´«°Ý­Ó°ÝÃD...
½Ð°Ý~  ¦pªG¤µ¤Ñ¦³­ÓEXCELÀÉ®× ¤º¦³¬¡­¶Ã¯  ²Ä¤@­¶¥¿­±¡B²Ä¤@­¶­I­±¡B²Ä¤G­¶
·Q§Q¥Îcombuttonªº«ö¶s±N ²Ä¤@­¶¥¿­± ²Ä¤@­¶­I­± ¥t¦s¦b²Ä¤@­ÓÀÉ®×(ÀɮצWºÙ ®Ú¾Ú ²Ä¤@­¶¥¿­±¤ºªº P4 Àx¦s®æªº­È¦s )¤º¡B ²Ä¤G­¶ ¦s¦b²Ä¤G­ÓÀÉ®×(ÀɮצWºÙÂê©w¬° Á`ªí)¦ý¬O¸ê®Æ·|§ó·s ©Ò¥H¦¹Àɮתº¸ê®Æ¬O©¹¤U¥B¤£­«½Æ
¤£ª¾¹D­n«ç¼g¤ñ¸û¦n~


¯à´ú¸Õ.rar (6.99 KB)



¦³§ä¨ì¤@½g¤å³¹(Â^¨ú¦Ü http://tw.myblog.yahoo.com/jw!FvCzE1CGBwNR004MLOT.vA--/article?mid=18&prev=34&next=12&l=f&fid=5)¸Ì­±¦³¼g ¦ý¬O ¥L¬O¤À³Î«Ü²Ó
§Ú¦³¸ÕµÛ¥h­×§ï  ¦ý¬O ¨C¦¸­×§ï³£·|¥X²{ ¿ù»~°T®§(¸ô®|¿ù»~)
  1. Sub ¤Á³Î¬¡­¶Ã¯()

  2. source_window_name = ActiveWindow.Caption
  3. source_path_name = ActiveWorkbook.Path
  4.     '¥ý§â²{¦b·Ç³Æ¤À³Îªº­ì©lÀɮתºµøµ¡¦WºÙ¤Î¸ô®|°O¿ý¤U¨Ó
  5.    
  6. target_path = source_path_name & "\" & Left(source_window_name, Len(source_window_name) - 4)
  7. MkDir target_path
  8.     '«Ø¥ß·Ç³ÆÀx¦s¤Á³Î§¹¦¨Àɮתº·s¸ê®Æ§¨

  9. For i = 1 To ActiveWorkbook.Sheets.Count
  10.     '¨Ï¥Î°j°é , °õ¦æ¦¸¼Æ¬O§@¥Î¤¤ªº¬¡­¶Ã¯ªº¤u§@ªí¼Æ¶q

  11.     ActiveWorkbook.Sheets(i).Copy
  12.     '§â§@¥Î¤¤ªº¬¡­¶Ã¯ªº²Äi­Ó¤u§@ªí½Æ»s¨ì¥t¤@­Ó·s¶}±Òªº¬¡­¶Ã¯

  13.     ActiveWorkbook.SaveAs target_path & "\" & ActiveSheet.Name
  14.     '»Ýª`·N³o¸ÌªºActiveWorkbook¤w¸g¬O·sªº¬¡­¶Ã¯¤F
  15.     '§â·s¬¡­¶Ã¯Àx¦s¨ì«ü©w¸ô®| , ¥BÀɦW»P¤u§@ªí¦WºÙ¬Û¦P

  16.     ActiveWorkbook.Close
  17.     'Ãö³¬¤w¸gÀx¦sªº·s¬¡­¶Ã¯

  18.     Windows(source_window_name).Activate
  19.     '±N§@¥Îµøµ¡¤Á´«¦^­ì©lÀÉ®×
  20. Next
  21. End Sub
½Æ»s¥N½X

        ÀR«ä¦Û¦b : ¤p¨Æ¤£°µ¡B¤j¨ÆÃø¦¨¡C
ªð¦^¦Cªí ¤W¤@¥DÃD