|
- Sub qq()
- Cells.Clear
- Dim mapath$, maname$, wb As Workbook, ws As Worksheet, s$, r%
- Application.ScreenUpdating = False
- Application.DisplayAlerts = False
- mapath = ThisWorkbook.Path & ""
- maname = Dir(mapath & "*初审*.xlsx")
- Do While maname <> ""
- If maname <> ThisWorkbook.Name Then
- r = r + 1
- Set wb = Workbooks.Open(mapath & maname)
- For Each ws In wb.Sheets
- s = ws.Name
- If InStr(s, "表3") Then
- ws.[a1].CurrentRegion.Copy Range("a" & r)
- End If
- Next
- End If
- wb.Close
- maname = Dir
- r = Cells(Rows.Count, 1).End(xlUp).Row
- Loop
- End Sub
复制代码 |
|