Ad Clicks : Ad Views :
Excel formulas and tutorials

Excel formulas and useful tools

img

VBA macro create PDF print as

/
/
/
189 Views

A very helpful VBA macro that turns any printable excel document into a PDF file.

Convert excel to pdf or save excel to pdf

Excel to pdf

Sub savepdf()
mo= Month(Date)
d = Day(Date)
y = Year(Date)
h = Hour(Now)
m = Minute(Now)
s = Second(Now)

file= y & mo & d & “-” & h & m & s & “.pdf”
Sheets(“sheet1”).ExportAsFixedFormat Type:=xlTypePDF, Filename:= _
file, Quality:=xlQualityStandard, _
IncludeDocProperties:=True, IgnorePrintAreas:=False, OpenAfterPublish:= _
True

End Sub

  • Facebook
  • Twitter
  • Google+
  • Linkedin
  • Pinterest

Leave a Comment

Your email address will not be published. Required fields are marked *

This div height required for enabling the sticky sidebar