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

[µo°Ý] §R°£«ü©w¸ê®Æ§¨¤¤©Ò¦³¥¨¶°

¥»©«³Ì«á¥Ñ GBKEE ©ó 2012-6-9 12:11 ½s¿è

¦^´_ 1# PJChen
¥t¦s¬° 2007µL¥¨¶°®æ¦¡ªº¬¡­¶Ã¯ "xlsx"
  1. Sub Ex()
  2.     Dim xlPath As String, xlFile As String      'String: ¸ê®Æ«¬ºA
  3.     Application.DisplayAlerts = False           '°±¤î¨t²Îªº´£¥Ü
  4.     xlPath = ThisWorkbook.Path & "\"            'ThisWorkbook.Path: µ{¦¡½X¬¡­¶Ã¯©Ò¦sÀɪº¸ô®|;  §A¥i­×§ï¬°«ü©wªº¸ô®|
  5.     xlFile = Dir(xlPath & "*.xlsm")             '«ü©wªº¸ô®|¤¤ ´M§ä°ÆÀɦW"xlsm"ªºÀÉ®×
  6.     Do While xlFile <> ""                        '³B¸Ì §ä¨ì"xlsm"ªºÀÉ®×
  7.         With Workbooks.Open(xlPath & xlFile)    '¶}±Ò³oÀÉ®×
  8.             .SaveAs Filename:=Mid(xlPath & xlFile, 1, Len(xlPath & xlFile) - 1) & "x", FileFormat:=51
  9.                                                 '³oÀÉ®×¥t¦s¬° 2007µL¥¨¶°®æ¦¡ªº¬¡­¶Ã¯ "xlsx"
  10.             .Close                              'Ãö³¬ÀÉ®×
  11.         End With
  12.         xlFile = Dir                            '«ü©wªº¸ô®|¤¤Ä~Äò´M§ä°ÆÀɦW"xlsm"ªºÀÉ®×
  13.     Loop
  14.     If Dir(xlPath & "*.xlsm") <> "" Then Kill xlPath & "*.xlsm"
  15.                                                 '§R°£«ü©wªº¸ô®|¤¤©Ò¦³°ÆÀɦW"xlsm"ªºÀÉ®×
  16.     Application.DisplayAlerts = True            '«ì´_¨t²Îªº´£¥Ü
  17. End Sub
½Æ»s¥N½X

TOP

¦^´_ 11# PJChen
¤Ä¿ï¥¦

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

TOP

        ÀR«ä¦Û¦b : ¦³¦h¤Ö¤O¶q´N°µ¦h¤Ö¨Æ¡A¤£­n¤ß¦sµ¥«Ý¡Aµ¥«Ý¤~·|¸¨ªÅ¡C
ªð¦^¦Cªí ¤W¤@¥DÃD