¡@¼ÊºÙ: ÀH·ÄÆ¿ºªº¦Ð¤ò ¡@ÀY»Î: [±s¥Î]¼ç¤ô¸¥
°ª¤¤¥Í
- ©«¤l
- 852
- ¥DÃD
- 79
- ºëµØ
- 0
- ¿n¤À
- 918
- ÂI¦W
- 0
- §@·~¨t²Î
- Windows 7 , XP
- ³nÅ骩¥»
- Office 2007, Office 2003,Office 2010,YoZo Office
- ¾\ŪÅv
- 50
- ©Ê§O
- ¨k
- ¨Ó¦Û
- ¦t©z
- µù¥U®É¶¡
- 2011-4-8
- ³Ì«áµn¿ý
- 2024-2-21
|
¦^´_ 1# onegirl0204
§Aªº·N«ä¬O»¡
n¤@ÓÀɮק@¬° ¬d¸ß
µM«á¨ä¥LÀɮק@¬°¸Ó Àɮתº¸ê®ÆÂ^¨ú¨Ó·½???
¥H¤Uì©l½X ¬° ª©¤j¤§«e©Ò°µªº Â^¨ú¸Ó¤p¬q¥X¨Ó....- Private Sub CommandButton1_Click() '¦¹¥\¯à«ö¶s¦WºÙ¬° ¬d¸ß
- Sheets("¬d¸ß").Select
- '¦¹°Ï¬° ¬d¸ß¥\¯àªºµ{¦¡½X
- Sheets("¬d¸ß").Select
- Range("A2:cz65535").Clear
- Dim Ar()
- Application.DisplayAlerts = False
- Application.ScreenUpdating = False
- With Sheet1
- nd = IIf(OptionButton1 = True, 1, IIf(OptionButton2 = True, 2, IIf(OptionButton3 = True, 3, IIf(OptionButton4 = True, 4, IIf(OptionButton5 = True, 5, IIf(OptionButton6 = True, 6, IIf(OptionButton7 = True, 8, IIf(OptionButton8 = True, 10, IIf(OptionButton9 = True, 12, IIf(OptionButton10 = True, 13, IIf(OptionButton11 = True, 14, IIf(OptionButton12 = True, 15, IIf(OptionButton13 = True, 16, IIf(OptionButton14 = True, 17, IIf(OptionButton15 = True, 25, 0))))))))))))))) '³oÃä§Ú¬O¥Î OPTIONBUTTON·í§@¬d¸ßªº¿ï¶µ±±¨î
-
- mystr = "*" & TextBox1 & "*"
- '---¦¹°Ï¬°§PŪ
- If nd = 0 Then MsgBox "½Ð¿ï¾Ü¬d¸ß¶µ¥Ø": Exit Sub
-
- fs = Dir(ThisWorkbook.Path & "\*Á`ªí.xls") '³oÃä§ï§Anªº¦WºÙ
-
- 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, 1).Value, .Cells(a.Row, 2).Value, .Cells(a.Row, 3).Value, .Cells(a.Row, 4).Value, .Cells(a.Row, 5).Value, .Cells(a.Row, 6).Value, .Cells(a.Row, 7).Value, .Cells(a.Row, 8).Value, .Cells(a.Row, 9).Value, .Cells(a.Row, 10).Value, .Cells(a.Row, 11).Value, .Cells(a.Row, 12).Value, .Cells(a.Row, 13).Value, .Cells(a.Row, 14).Value, .Cells(a.Row, 15).Value, .Cells(a.Row, 16).Value, .Cells(a.Row, 17).Value, .Cells(a.Row, 18).Value, .Cells(a.Row, 19).Value, .Cells(a.Row, 20).Value, .Cells(a.Row, 21).Value, .Cells(a.Row, 22).Value, .Cells(a.Row, 23).Value, .Cells(a.Row, 24).Value, .Cells(a.Row, 25).Value) '³oÃä¬O§PÂ_Äæ¦ì
-
- S = S + 1
- Label1.Caption = " ¬d¸ß¦WºÙ¡G" & TextBox1.Text & " ¡F " & " ¬d¸ßªºµ§¼Æ¬°¡G" & S & " µ§¸ê®Æ"
- Label2.Caption = "¬d¸ß®É¶¡¡G" & Date & " " & Time
- End If
-
- Next
-
- 10
-
- End With
-
- Next
-
- .Close 0
-
- End With
-
- fs = Dir
-
- Loop
-
- If S > 0 Then
-
- .[A2:z65536] = ""
-
- .[A2].Resize(S, 28) = Application.Transpose(Application.Transpose(Ar))
-
- Else
- MsgBox "¬dµL¸ê®Æ"
- End If
- End With
-
- Application.ScreenUpdating = True
- 'ActiveWindow.Close savechanges:=True
- End Sub
½Æ»s¥N½X |
|