ªð¦^¦Cªí ¤W¤@¥DÃD µo©«

[µo°Ý] ¤@­Ó¤u§@ªí«ö±ø¥ó¦s¬°¤£¦PPDF

[µo°Ý] ¤@­Ó¤u§@ªí«ö±ø¥ó¦s¬°¤£¦PPDF

Attendance Data Report ¦s¤À©±PDF.rar (134.62 KB)

¦³¤@­Ó¥X¶Ôªí¤º¦³¤£¦P¤À©±­û¤u¥X¶Ô¸ê®Æ, ¨D±Ð¦p¦ó¥HVBA«ö±ø¥óSAVE¬°¥H¤À©±¦W¬°¦WªºPDF.
²{®É­n¨C­Ó¤À©±¿ï©w½d³ò¤~SAVE PDF, «D±`ºC¤Î®ö¶O®É¶¡.
¦³³Ò¨ó§U!:L :'(

¦U¦ì,¦³·s°ÝÃD, ¦]·Q¥t³]¤@­Ó¿é¤Jªº¿ï¾Ü, ¤w©w¦p¤U, ¦p¦³¨â­Ó°ÝÃD¥¼°µ¨ì:
(1)  ¥H¢á¢Ö¢Ý¢Þ¢±¡@¿é¤J¢Ï¡A¡@¥tF¿é¤J"201507", ·QPDF FILE·|Âର"¢Ï¡@201507".PFD¦ý¥X²{¿ù»~
(2) ¦bÂàPDF«á, ¦p¦óªð¦^EXCEL, ¦]¬°­n±N¨C­ÓPDF³v­ÓÃö³¬.

Sub in_box2()
'
Dim shop2 As String
Dim f As String

'
    shop2 = InputBox("Enter your shop code")
    f = InputBox("Enter month of the report")
    Range("B4").AutoFilter Field:=4, Criteria1:=shop2
    Range("B4").CurrentRegion.Select
   
ChDir "C:\Users\Desktop\"
    ActiveSheet.ExportAsFixedFormat Type:=xlTypePDF, filename:= _
        "C:\Users\Desktop\" & f & "2015.pdf"), Quality:=xlQualityStandard, IncludeDocProperties:=True, IgnorePrintAreas _
        :=False, OpenAfterPublish:=True
'
   
End Sub

TOP

¦^´_ 11# starry1314


    ¦¨¥\, ¦hÁÂ!:'(

TOP

¦^´_ 10# missbb


    ¥ý¦bEXCEL³]©w¦n¤ñ¸û§Ö,¤W¤è ¡iª©­±°t¸m¡j¥i½Õ¾ã

TOP

¦^´_ 9# starry1314 1

·PÁÂ, ¦ý°ÝÃD¬O¤@ÂàPDF´N¬O113­¶, ¬O¿ï©w½d³òªº°ÝÃD¶Ü?
¥t¦p¦ó³]©wÃä¬É?¬O¦bÂध«e°µ¦n¤F³]©w¤~Âà©Î¬O¦bVBA½X¤º³]©w?

TOP

¦^´_ 8# missbb
  1. Sub ex()
  2. Set d = CreateObject("Scripting.Dictionary")
  3. With ActiveSheet
  4. For Each a In .Range(.[E4], .[E4].End(xlDown))
  5.   d(a.Value) = ""         '¨ú±o©Ò¦³¤£­«½Æ¤À©±
  6. Next
  7. For Each ky In d.keys
  8.      .Range("B4").AutoFilter field:=4, Criteria1:=ky
  9.      If Dir("D:\" & ky & "201507.pdf") <> "" Then Kill "D:\" & ky & "201507.pdf"  '¦P¦WÀɮקR°£
  10.      .ExportAsFixedFormat Type:=xlTypePDF, Filename:= _
  11.         "D:\" & ky & "201507.pdf", Quality:=xlQualityStandard, IncludeDocProperties:=True, _
  12.         IgnorePrintAreas:=False, OpenAfterPublish:=True  '¥t¦s¦¨PDFÀÉ®×
  13. Next
  14. If .FilterMode = True Then .ShowAllData 'Åã¥Ü©Ò¦³¸ê®Æ
  15. End With
  16. End Sub
½Æ»s¥N½X

TOP

¦^´_ 7# starry1314

§A¦n, ¦ý§Ú¥[¤J¤F·sµ{¦¡½X, ¤´µM¦³°ÝÃD, ¥iÀ°¦£¬Ý¬Ý¶Ü?

VBA Attendance Data Report to PDF 20150801 test.rar (129.66 KB)

TOP

¦^´_ 5# missbb


         If Dir("D:\" & ky & "201507.pdf") <> "" Then Kill "D:\" & ky & "201507.pdf"  '¦P¦WÀɮקR°£
     .ExportAsFixedFormat Type:=xlTypePDF, Filename:= _

        "D:\" & ky & "201507.pdf", Quality:=xlQualityStandard, IncludeDocProperties:=True, _
        IgnorePrintAreas:=False, OpenAfterPublish:=True  '¥t¦s¦¨PDFÀÉ®×
Next

TOP

¦^´_ 3# Hsieh

¦³³Ò¦A¨ó§U!

TOP

¦^´_ 4# missbb 3

¥t¥~, ·Q±NÀɦWÅܬ°A 201507, §ï¤F¤U­±ªº½X, ¦ýÀɦW¤´µM¬OA, ¬°¬Æ»ò©O?

    If Dir("D:\" & ky & "201507" & ".pdf") <> "" Then Kill "D:\" & ky & "201507" & ".pdf" '¦P¦WÀɮקR°£
     .ExportAsFixedFormat Type:=xlTypePDF, Filename:= _

TOP

        ÀR«ä¦Û¦b : ¦³Ä@©ñ¦b¤ß¸Ì¡A¨S¦³¨­Åé¤O¦æ¡A¥¿¦p¯Ñ¥Ð¤£¼½ºØ¡A¬Ò¬OªÅ¹L¦]½t¡C
ªð¦^¦Cªí ¤W¤@¥DÃD