- ©«¤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
|
¥»©«³Ì«á¥Ñ GBKEE ©ó 2014-1-1 10:15 ½s¿è
¦^´_ 22# missbb - Option Explicit
- Sub Ex2() ' Hsieh & GBKEE
- Dim f$, fd$, fs$, A As Range, Wb As Workbook, AR()
- Set Wb = ThisWorkbook ' ¬¡¶Ã¯ :µ{¦¡½X©Ò¦bªº
- fd = Wb.Path & "\" ' ¦sÀɪº¸ô®|
- Application.DisplayAlerts = False
- Application.ScreenUpdating = False
- With Wb.Sheets("PASSWORD")
- For Each A In .Range(.[A2], .[A2].End(xlDown))
- f = CStr(A)
- fs = fd & f & ".xls"
- AR = Wb.Sheets(f).UsedRange.Value
- With Workbooks.Add(1)
- .ActiveSheet.Range("A1").Resize(UBound(AR, 1), UBound(AR, 2)) = AR
- ' FileFormat:=xlExcel8 Excel 2003ª©¥» 56; xlExcel12 version 12, or 14, or 15 = Excel 2007, or 2010, or 2013.
-
- .SaveAs Filename:=fs, Password:=CStr(A.Offset(, 1)), WriteResPassword:="" , FileFormat:=xlExcel8
- .Close 0 ' Ãö³¬ "D:\A123.xls" ¬¡¶Ã¯¡B"D:\B456.xls" ¬¡¶Ã¯¡C
- End With ' ¥¿¦¡µ²§ô (Ãö³¬)¡C
- Next
- End With
- Application.DisplayAlerts = True
- Application.ScreenUpdating = True
- End Sub
½Æ»s¥N½X |
|