- ©«¤l
- 4901
- ¥DÃD
- 44
- ºëµØ
- 24
- ¿n¤À
- 4916
- ÂI¦W
- 72
- §@·~¨t²Î
- Windows 7
- ³nÅ骩¥»
- Office 20xx
- ¾\ŪÅv
- 150
- ©Ê§O
- ¨k
- ¨Ó¦Û
- ¥x¥_
- µù¥U®É¶¡
- 2010-4-30
- ³Ì«áµn¿ý
- 2024-3-28
|
¥»©«³Ì«á¥Ñ Hsieh ©ó 2011-6-9 08:51 ½s¿è
¦^´_ 5# mark15jill - Sub ex()
- Dim Ar()
- Application.ScreenUpdating = False
- With Sheet1
- nd = IIf(.OptionButton1 = True, 2, IIf(.OptionButton2 = True, 5, 0))
- mystr = "*" & .TextBox1 & "*"
- If nd = 0 Then MsgBox "½Ð¿ï¾Ü¬d¸ß¶µ¥Ø": Exit Sub
- fs = Dir(ThisWorkbook.Path & "\*¦~«×.xls")
- Do Until fs = ""
- With Workbooks.Open(ThisWorkbook.Path & "\" & fs)
- For Each Sh In .Sheets
- With Sh
- If Application.CountA(.Columns(nd)) = 0 Then GoTo 10
- For Each a In .Columns(nd).SpecialCells(xlCellTypeConstants)
- If a Like mystr Then
- ReDim Preserve Ar(s)
- Ar(s) = Array(fs, .Name, s + 1, .Cells(a.Row, 2).Value, .Cells(a.Row, 4).Value, .Cells(a.Row, 1).Value, .Cells(a.Row, 5).Value)
- s = s + 1
- End If
- Next
- 10
- End With
- Next
- .Close 0
- End With
- fs = Dir
- Loop
- If s > 0 Then
- .[A3:G65536] = ""
- .[A3].Resize(s, 7) = Application.Transpose(Application.Transpose(Ar))
- Else
- MsgBox "¬dµL¸ê®Æ"
- End If
- End With
- Application.ScreenUpdating = True
- End Sub
½Æ»s¥N½X |
|