- ©«¤l
- 175
- ¥DÃD
- 8
- ºëµØ
- 0
- ¿n¤À
- 207
- ÂI¦W
- 276
- §@·~¨t²Î
- WIN 10
- ³nÅ骩¥»
- Office 2010
- ¾\ŪÅv
- 20
- ©Ê§O
- ¤k
- µù¥U®É¶¡
- 2011-6-30
- ³Ì«áµn¿ý
- 2024-11-23
|
¦^´_ 1# jimmuLu - Sub Exx()
- '¦X¨Ö¦P¤@¸ê®Æ§¨¤º©Ò¦³ExcelÀɤ§Sheet¤u§@ªí
- Dim NewName As String
- Dim MyBook As Workbook
- Dim MyFile$, i%, k%
- MyFile = Dir(ThisWorkbook.Path & "\*.xls")
- Set MyBook = ThisWorkbook
- i = 1
- Application.ScreenUpdating = False
- Do While MyFile <> ""
- If MyFile <> MyBook.Name Then
- With Workbooks.Open(ThisWorkbook.Path & "\" & MyFile)
- For k = 1 To Sheets.Count
- Sheets(k).Select
- ActiveSheet.Range("a1").Select
- NewName = Left(MyFile, Len(MyFile) - 4)
- ActiveSheet.Copy After:=MyBook.Sheets(MyBook.Sheets.Count)
- ActiveSheet.Name = NewName & "_" & k
- Next k
- k = 1
- Application.DisplayAlerts = False
- .Close
- On Error Resume Next
- End With
- End If
- MyFile = Dir
- Loop
- Application.ScreenUpdating = True
- End Sub
½Æ»s¥N½X |
|