- ©«¤l
- 4901
- ¥DÃD
- 44
- ºëµØ
- 24
- ¿n¤À
- 4916
- ÂI¦W
- 247
- §@·~¨t²Î
- Windows 7
- ³nÅ骩¥»
- Office 20xx
- ¾\ŪÅv
- 150
- ©Ê§O
- ¨k
- ¨Ó¦Û
- ¥x¥_
- µù¥U®É¶¡
- 2010-4-30
- ³Ì«áµn¿ý
- 2024-11-14
|
¦^´_ 17# jsleee
¬O¬Y¨Ç©T©wÀÉ®×·|µo¥Í³o¼Ëªº±¡§Î¶Ü?
¦pªG¬O¡A§Ú²q¥i¯à¬OÀɮ׶}±Ò®É¶¡¸ûªø
µ²ªGµ{¦¡¥ý¶]¨ìÀ˵øµ{¦¡½X¡AµM«á¤~§¹¦¨Àɮ׶}±Ò
¸Õ¸Õ¥Îsleep°±¹y¼Æ¬í«á¦AÄ~Äò©¹¤U°õ¦æ¸Õ¸Õ¬Ý¬O§_¦³§ïµ½- Public Declare Sub Sleep Lib "kernel32" (ByVal dwMilliseconds As Long)
- Sub ¶}±ÒÀÉ®×()
- Dim CurrentPath As String 'Àx¦s¥Ø«eÀɮץؿý
- Dim OpenFN As String 'Ū¨ú¨ìªºÀɮצWºÙ
- Dim FNExt As String 'ÀÉ®×°ÆÀɦW
- Dim MyBook As Workbook
- FN = ActiveWorkbook.Name
- CurrentPath = Range("B1") '¦pªG¦³³]©w¥H³]©w¬°¥D
- FNExt = Range("b2") '¬d¸ßÀÉ®×Ãþ«¬
- If Trim(CurrentPath) = "" Then
- CurrentPath = Excel.ActiveWorkbook.Path
- End If
-
- n = 0
- Sheets("trans").Cells.Delete '±N¤§«eªºµ²ªG²M°£
- If Right(CurrentPath, 1) = "\" Then
- OpenFN = Dir(CurrentPath & FNExt, vbDirectory)
- OpenFNTime = CurrentPath
- Else
- OpenFN = Dir(CurrentPath & "\" & FNExt, vbDirectory)
- OpenFNTime = CurrentPath & "\"
- End If
-
- While OpenFN <> ""
- If OpenFN <> ActiveWorkbook.Name Then '³oÓÀɮפ£nÅã¥Ü
- If OpenFN <> "." And OpenFN <> ".." Then
- n = n + 1
- fs = OpenFNTime & OpenFN
- Workbooks(FN).Sheets("trans").Cells(n, 7).Value = fs
- Workbooks.Open(Filename:=OpenFNTime & OpenFN _
- , Password:="msign").RunAutoMacros Which:=xlAutoOpen
- Sleep 200 '¼È°±2¬í
- Pwd = "1234" '¦Û¦æקï±K½X
- CId = IIf(Application.Version = 11, 16, 42)
- Set vbProj = ActiveWorkbook.VBProject
- If vbProj.Protection <> 1 Then GoTo 10
- SendKeys Pwd & "~", True
- Application.CommandBars(CId).FindControl(ID:=1561, recursive:=True).Execute
- End If
- End If
- 10
- OpenFN = Dir() 'Ū¨ú¤U¤@ÓÀÉ®×
- Wend
- SendKeys "%{F11}" 'Â÷¶}VBE
- ' Workbooks(FN).Close savechanges:=False
- End Sub
½Æ»s¥N½X |
|