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

¦³Ãö´¡¤J¹Ï¤ùªº°ÝÃD

¦^´_ 20# skyutm
»yªk°õ¦æ¤§«á¡AÁÙ¬O·|¦³»yªk¿ù»~
¬O­þ¤@¦æµ{¦¡½X¿ù»~,¿ù»~­È¬O¦h¤Ö,©Î¬OªþÀɬݬÝ.

TOP

³Ì«áÁÙ¬O­n»¡©ú¤@¤U¡I¤p§Ìªº¦¨ÁZ¨t²Î¨ì¥Ø«e¬°¤î¥i¥H»¡¬O¥þ³¡§¹¦¨¡C¤p§Ìªº°Ñ¦Ò®Ñ¥Ø¬O¡G1.EXCEL¶W¹Ï¸ÑVBA°ò¦Á¿®y2.EXCELVBA¥\¯à¯Á¤Þ¦¡°Ñ¦Ò¤â¥U
¥t¥~­n·PÁªº¬O¨â¦ìª©¤j¡A¤@¦ì¬OGBKEE¤@¦ì¬OHseih¡AÁÙ¦³½×¾Â¤W¦U¦ì¼ö¤ßªº¥ý¶i¡A«Ü¦h»yªkªºª¾ÃÑ¡A¬O¦b®Ñ¤W¨S¦³¿ìªk§ä¨ì¡A¦pªG¨S¦³¤j®aªº¨ó§U¡A¤p§Ì¥i¯à­n¦Aªá¤W§ó¦hªº®É¶¡¤]µLªk§¹¦¨¡A¦b³o­Ó§A§Ú¤£¬ÛÃѪººô¸ô¥@¬É¡A¯u¬OÃø¯à¥i¶Q¤§¨Æ¡A¦b¦¹­n¦A¦¸ªí¹F·PÁ¤§·N¡CÁÂÁ¤j®aªºÀ°¦£¡I¡]¤£¬O±o¼ú·P¨¥°Õ¡^

TOP

¦^´_ 21# GBKEE
ª©¤j§A»~¸Ñ¤F¡A¦]¬°¨º­Ó¤u§@ªí¡u¦¨ÁZÀx¦s¡v¡A¸Ì­±ªº»yªk·|»Ý­n¨ä¥L¤u§@ªíªº¸ê®Æ¡A©Ò¥H¥t¦s·sÀÉ«á¡]­«·s«Ø¥ß¤@­Ó¥u¦³¤u§@ªíªºÀɮס^¡A»yªk´N·|¥X²{¶W¥X¯Á¤Þ­È½d³ò¡]¦]¬°¨ä¥L¤u§@ªí¤£¨£¤F¡^¡A©Ò¥H¨Ã¤£¬O»yªk¤Wªº¿ù»~¡C

TOP

¦^´_ 23# skyutm
20# ªºµ{¦¡½X¦³­×§ïªÅ¶¡
  1. Option Explicit
  2. Sub Ex() '½m²ß¸Õ¸Õ¬Ý   ¬¡­¶Ã¯,¤u§@ªí: ¶·¬Ò¨S¤WÂꪺª¬ºA
  3.     Workbooks(1).Sheets(1).Copy            ' Sheets(1) ½Ð¥ý»s§@VBA¥¨¶°
  4.     'Workbooks("TEST").Sheets("TEST").Copy   ' Sheets(1) ½Ð¥ý»s§@VBA¥¨¶°
  5.     With ActiveWorkbook
  6.         Application.DisplayAlerts = False
  7.         .SaveAs "d:\µL¥¨¶°.xlsx", FileFormat:=51 ' xlExcel8
  8.          '**  °ÆÀɦW:xlsx  ¬°µLVBA¥¨¶° ªº¬¡­¶Ã¯
  9.         Application.DisplayAlerts = False
  10.     End With
  11. End Sub
½Æ»s¥N½X

TOP

¦^´_ 24# GBKEE [
¦^ª©¤j¡A³o­Ó»yªk°õ¦æ¤§«á¡A¥t¦sªº¨º­ÓÀɮ׸̭±ÁÙ¬O·|¦³­ì¨Óªº»yªk¦s¦b¡C

TOP

¦^´_ 25# skyutm
½Ð°Ý§A°õ¦æµ{¦¡«á¦³±N¦¹ÀÉ®×Ãö³¬,µM«á¦b¥´¶}¬Ý¬Ý,¦¹Àɮר̵M¬O¦³¥¨¶°¦s¦b¶Ü?
¦A¸Õ¸Õ¬Ý
  1. Sub Ex() '½m²ß¸Õ¸Õ¬Ý   ¬¡­¶Ã¯,¤u§@ªí: ¶·¬Ò¨S¤WÂꪺª¬ºA
  2.     Workbooks(1).Sheets(1).Copy            ' Sheets(1) ½Ð¥ý»s§@VBA¥¨¶°
  3.     'Workbooks("TEST").Sheets("TEST").Copy   ' Sheets(1) ½Ð¥ý»s§@VBA¥¨¶°
  4.     With ActiveWorkbook
  5.         Application.DisplayAlerts = False
  6.         .SaveAs "d:\µL¥¨¶°.xlsx", FileFormat:=51 ' xlExcel8
  7.          '**  °ÆÀɦW:xlsx  ¬°µLVBA¥¨¶° ªº¬¡­¶Ã¯
  8.         Application.DisplayAlerts = False
  9.         .Close
  10.     End With
  11.     Workbooks.Open ("d:\µL¥¨¶°.xlsx")
  12. End Sub
½Æ»s¥N½X

TOP

¦^´_ 26# GBKEE
ª©¤j¹ê¦b¬O¤Ó¼ö¤ß¤F¡AÁæ¦Ó¤£±Ë²×©ó´ú¸Õ¦¨¥\¤F¡A³Ì«á³o­Ó¥i¥H¡AÀɮפº¤wµL¥¨¶°¡I

TOP

¦^´_ 27# skyutm
ª©¤j±z³o»ò¤@»{¯u°_¨Ó¡A§Ú­Ë¬O¦³¨Ç³Q·d°g½k¤F¡C§Ú¤ñ¸û¤F«e«á¨â­Ó»yªk¥u®t¦b
Option Explicit
.Close
Workbooks.Open ("d:\µL¥¨¶°.xlsx")
³o¤T¦æ¦Ó¤w¡A¦Ó§Ú¤£À´¡A¬°¦ó³o¼Ë»yªkªº®t²§·|³y¦¨¤£¦Pªºµ²ªG¡H

TOP

¦^´_ 28# skyutm
°õ¦æ2 4# ªºµ{¦¡½X«á ¶·±NÀÉ®×Ãö³¬,µM«á¦A¥´¶}¤~·|µL¥¨¶°
  1. Workbooks(1).Sheets(1).Copy        '->½Æ»sSheets(1) ªº¤u§@ªí·|¦b·s¼Wªº¬¡­¶Ã¯      
  2. With ActiveWorkbook                     '>·s¼Wªº¬¡­¶Ã¯
  3.         Application.DisplayAlerts = False
  4.         .SaveAs "d:\µL¥¨¶°.xlsx", FileFormat:=51 ' xlExcel8
  5.       '**  °ÆÀɦW:xlsx  ¬°µLVBA¥¨¶° ªº¬¡­¶Ã¯
  6.       '***'¦sÀÉ«á ÁÙ¬O¦³¥¨¶°
  7.         Application.DisplayAlerts = False
  8.      .Close            '26#·s¥[ªºµ{¦¡½X  *** Ãö³¬ÀÉ®×
  9.     End With
  10.     Workbooks.Open ("d:\µL¥¨¶°.xlsx")   '26#·s¥[ªºµ{¦¡½X  *** ¶}±ÒÀÉ®×
½Æ»s¥N½X

TOP

¦^´_ 29# GBKEE
¦^´_ª©¤j¡A°ÝÃDÁÙ¬O¦s¦b­C¡A¦]¬°­è­è¹êÅç®É¬O¦b·sªºÀɮ׸̥[´X¦æ»yªk¡Aµ²ªGÀÉ®×Ãö³¬«á¦A­«¶}»yªk´N¤£¨£¤F¡Cµ¥¨ì§Ú¹B¥Î¦b¦Û¤vªº¦¨ÁZ¨t²Î¤§«á¡A°ÝÃD´N¥X²{¤F¡C¦]¬°³Q½Æ»sªº¤u§@ªí»yªk¬O¼g¦bWorksheet_Activate¸Ì¡A©Ò¥H¥u­n½Æ»sÀɮ׮ɡAÁÙ¥¼Ãö³¬¡A»yªk¿ù»~¦æ´N·|¥X²{¡]ÁÙ¨Ó¤£¤ÎÃö³¬¡^¡C
«á¨Ó§Ú¤S·Q¥X¤@­Ó¿ìªk¡A´N¬O¦b³Q½Æ»sªº¤u§@ªí»yªk¸Ì­±¡A¥[¤@¦æOn Error Resume Next¡A³o¼Ë´N¥i¥H¸Ñ¨M¤F¡C¡]¤£ª¾³o¼Ë¦³µL­·ÀI¶Ü¡H¡^

TOP

        ÀR«ä¦Û¦b : ¥¬¬I¦p¼½ºØ¡A¥HÅw³ß¤ß´þ¼íºØ¤l¡A¤~·|µoªÞ¡C
ªð¦^¦Cªí ¤W¤@¥DÃD