- ©«¤l
- 5923
- ¥DÃD
- 13
- ºëµØ
- 1
- ¿n¤À
- 5986
- ÂI¦W
- 0
- §@·~¨t²Î
- win10
- ³nÅ骩¥»
- Office 2010
- ¾\ŪÅv
- 150
- ©Ê§O
- ¨k
- ¨Ó¦Û
- ¥xÆW°ò¶©
- µù¥U®É¶¡
- 2010-5-1
- ³Ì«áµn¿ý
- 2022-1-23
        
|
¦^´_ 4# mark15jill - Private Sub ¬d¸ß()
- Dim Text$, File$, TheSh As Object, Sh As Worksheet, Rng As Range, RngAddress$
- With ThisWorkbook 'µ{¦¡½X¸m©ó¬d¸ßÁ`ªí.xls
- Set TheSh = .Sheets("¬d¸ß")
- TheSh.UsedRange.Offset(2).Clear
- File = Dir(.Path & "\*¦~«×*.xls")
- Do While File <> ""
- With Workbooks.Open(.Path & "\" & File)
- For Each Sh In .Sheets
- Set Rng = Sh.Range("e:e").Find(TheSh.TextBox1, LookAt:=xlWhole)
- If Not Rng Is Nothing Then
- RngAddress = Rng.Address
- With TheSh.Range("C" & Rows.Count).End(xlUp)
- .Offset(1, -2) = File
- .Offset(1, -1) = Sh.Name
- End With
- End If
- Do While Not Rng Is Nothing
- With TheSh.Range("C" & Rows.Count).End(xlUp)
- .Offset(1).Resize(1, 6) = Sh.Range(Sh.Cells(Rng.Row, "A"), Sh.Cells(Rng.Row, "F")).Value
- End With
- Set Rng = Sh.Range("e:e").FindNext(Rng)
- If RngAddress = Rng.Address Then Exit Do
- Loop
- Next
- .Close 0
- End With
- File = Dir
- Loop
- End With
- End Sub
- Sub ¦sÀÉ() 'µ{¦¡½X¸m©ó¬d¸ßÁ`ªí.xls
- Dim Sh As Object
- On Error Resume Next
- Set Sh = ThisWorkbook.Sheets(1)
-
- With Workbooks.Add(xlWBATWorksheet)
- Sh.UsedRange.Offset(1).Copy .Sheets(1).[A1]
- .SaveAs ThisWorkbook.Path & "\" & Sh.TextBox1
- .Close 0
- End With
- End Sub
½Æ»s¥N½X |
|