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

[µo°Ý] ±N10­ÓXLSÀÉ®×µ²¦X¦¨¤@­ÓÀÉ®×(¤w¸Ñ¨M)

[µo°Ý] ±N10­ÓXLSÀÉ®×µ²¦X¦¨¤@­ÓÀÉ®×(¤w¸Ñ¨M)

¥»©«³Ì«á¥Ñ jimmuLu ©ó 2011-8-22 10:46 ½s¿è

½Ð°Ý¦U¦ì¤j¤j:

­n¦p¦ó±N¨ã¦³¬Û¦P¤u§@ªí¤Î¬Û¦P¸ê®ÆÄæ¦ì¤§XLS¸ê®Æ

µ²¦X¦¨¤@­ÓÀÉ®×

¥¨¶°?¨ç¼Æ?

³Â·ÐÅo

¦^´_ 1# jimmuLu
  1. Sub Exx()
  2. '¦X¨Ö¦P¤@¸ê®Æ§¨¤º©Ò¦³ExcelÀɤ§Sheet¤u§@ªí
  3. Dim NewName As String
  4. Dim MyBook As Workbook
  5. Dim MyFile$, i%, k%

  6. MyFile = Dir(ThisWorkbook.Path & "\*.xls")
  7. Set MyBook = ThisWorkbook

  8. i = 1
  9. Application.ScreenUpdating = False
  10. Do While MyFile <> ""
  11.   If MyFile <> MyBook.Name Then
  12.      With Workbooks.Open(ThisWorkbook.Path & "\" & MyFile)
  13.      For k = 1 To Sheets.Count
  14.         Sheets(k).Select
  15.         ActiveSheet.Range("a1").Select
  16.         NewName = Left(MyFile, Len(MyFile) - 4)
  17.         ActiveSheet.Copy After:=MyBook.Sheets(MyBook.Sheets.Count)
  18.         ActiveSheet.Name = NewName & "_" & k
  19.      Next k
  20.      k = 1
  21.      Application.DisplayAlerts = False
  22.      .Close
  23.        On Error Resume Next
  24.      End With
  25.   End If
  26.   MyFile = Dir
  27. Loop
  28. Application.ScreenUpdating = True
  29. End Sub
½Æ»s¥N½X

TOP

¦^´_ 2# infoverdad


    ·PÁ±z!!

¦³ÃöVBAªº¼gªkÁÙ­n¸ò¤j¤j¾Ç²ß

3Qs

TOP

        ÀR«ä¦Û¦b : ­n§åµû§O¤H®É¡A¥ý·Q·Q¦Û¤v¬O§_§¹¬üµL¯Ê¡C
ªð¦^¦Cªí ¤W¤@¥DÃD