- ©«¤l
- 216
- ¥DÃD
- 71
- ºëµØ
- 0
- ¿n¤À
- 292
- ÂI¦W
- 0
- §@·~¨t²Î
- window xp
- ³nÅ骩¥»
- 2007
- ¾\ŪÅv
- 20
- ©Ê§O
- ¤k
- µù¥U®É¶¡
- 2012-6-27
- ³Ì«áµn¿ý
- 2024-9-28
|
¥»©«³Ì«á¥Ñ missbb ©ó 2016-12-12 14:26 ½s¿è
¦A¸Õ¤U¦CCODE, ³£µLªk±NROW 1¦C¥X, ¨D¤j¤j½ç±Ð?- [code]Sub printPDF_4()
- 'pdf for shop reporting errors
- Dim xPath As String
- Dim d As Object
- Dim A As Variant
- Dim f As String
- Dim ky As Variant
- Dim rng As Range
-
- ActiveSheet.PageSetup.PrintArea = ActiveCell.CurrentRegion.Address
- Set rng = ActiveSheet.UsedRange
- xPath = Application.ActiveWorkbook.Path
- Set d = CreateObject("Scripting.Dictionary")
- With Worksheets("attendance report")
- For Each A In .Range(.[c3], .[c3].End(xlDown))
- d(A.Value) = ""
- Next
- f = InputBox("¿é¤JPDFÀɪº¤ë¥÷, ¨Ò:201508")
- If f = "" Then Exit Sub
- For Each ky In d.KEYS
- .Range("c3").AutoFilter field:=3, Criteria1:=ky
-
- If Dir(xPath & "\" & ky & "_" & f & ".pdf") <> "" Then Kill xPath & "\" & ky & "_" & f & ".pdf" '¦P¦WÀɮקR°£
-
- rng.ExportAsFixedFormat Type:=xlTypePDF, fileName:= _
- xPath & "\" & ky & "_" & f & ".pdf", Quality:=xlQualityStandard, IncludeDocProperties:=True, _
- IgnorePrintAreas:=False, OpenAfterPublish:=False '¥t¦s¦¨PDFÀÉ®×
- Next
- If .FilterMode = True Then .ShowAllData 'Åã¥Ü©Ò¦³¸ê®Æ
- End With
- End Sub
½Æ»s¥N½X [/code] |
|