- ©«¤l
- 913
- ¥DÃD
- 150
- ºëµØ
- 0
- ¿n¤À
- 1089
- ÂI¦W
- 0
- §@·~¨t²Î
- win10
- ³nÅ骩¥»
- office 2019
- ¾\ŪÅv
- 50
- ©Ê§O
- ¤k
- µù¥U®É¶¡
- 2011-8-28
- ³Ì«áµn¿ý
- 2023-7-19
|
¦^´_ 2# Hsieh
ª©¤j,
¦bµ{¦¡°õ¦æ¹Lµ{¤¤,¥¦·|¤@ª½¥X²{¹ï¸Ü®Ø°Ý¬O§_§ó·s³sµ²?§Ú·Q¨ì¤§«e¤j¤jµ¹ªº¤G¥y¸Ü(ÂŦâ¦r),´N±N¥¦¥[¦b³oÓµ{¦¡¤¤,¦ý°õ¦æ®É°±¦bWith Workbooks.Open(fd & fs),¬O§_«ez¤G¥y¸Ü©ñ¿ù¦ì¸m¤F?
Application.DisplayAlerts = False
Application.AskToUpdateLinks = False- Sub Try()
- fd = ThisWorkbook.Path & "\" & Sheets(1).[E6] & "\"
- fs = Dir(fd & "*.xlsm")
- fs = Dir(fd & "*.xls")
- Do Until fs = ""
- Application.DisplayAlerts = False
- Application.AskToUpdateLinks = False
- With Workbooks.Open(fd & fs)
- For Each vbc In .VBProject.VBComponents
- Select Case vbc.Type
- Case vbext_rk_Project, vbext_wt_Browser, vbext_ct_MSForm 'µù
- .VBProject.VBComponents.Remove .Item(vbc.Name)
- Case Else
- .VBProject.VBComponents(vbc.Name).CodeModule.DeleteLines 1, _
- .VBProject.VBComponents(vbc.Name).CodeModule.CountOfLines
- End Select
- Next
- .Close 1
- End With
- fs = Dir
- Loop
- End Sub
½Æ»s¥N½X |
|