大致的框架:
Dim rng As Range
Dim sSht As String, sWk As String
With Worksheets("AA")
For Each rng In .Range("a5:a" & .[a65536].End(xlUp).Row)
sSht = "CC." & rng.Value
With Worksheets(sSht)
Macro甲
sWk = ThisWorkbook.Path & "\" & sSht
If Dir(sWk) <> "" Then Kill sWk
.ExportAsFixedFormat Type:=xlTypePDF, Filename:=sWk, _
Quality:=xlQualityStandard, IncludeDocProperties:=True, IgnorePrintAreas:=False, OpenAfterPublish:=True
End With
Next
End With作者: yafeii 時間: 2010-10-11 14:49