I currently run this macro activated by a button to save my workbook as a PDF file.  The  Macro works however I'd like to have only the first 7 worksheets included in the PDF creation all the other once should be ignored.
  
  The names of the worksheet tabs are always the same however other worksheets change position  into the first 7 and then be renamed to the standard name. the name order is normally Summary, Cost1,Cost2,Cost3, Des1,Des2,Des3 and ver.
  
  In the save as fumction you have a option for selection however i do not know how to replicate this in VBA to illiminate the human interaction
  
  Sub Save2PDF()
  '
  ' Save2PDF Macro
  '
      Dim WbP As String
      Dim ProjectName As String
      WbP = ActiveWorkbook.Path
      ProjectName = Cells(5, 6)
      
  
  '
      ActiveWorkbook.ExportAsFixedFormat Type:=xlTypePDF, Filename:=ProjectName & "_Report", Quality:=xlQualityStandard, IncludeDocProperties:=True, IgnorePrintAreas _
          :=False, OpenAfterPublish:=True
          
  
  
Be sure to check out TechTrax Ezine for many, free Excel VBA articles! Go here: http://www.mousetrax.com/techtrax to enter the ezine, then search the ARCHIVES for EXCEL VBA.
----------------------------------
Visit our ExcelVBA group home page for more info and support files:
http://groups.yahoo.com/group/ExcelVBA
----------------------------------
More free tutorials and resources available at:
http://www.mousetrax.com
----------------------------------
Tidak ada komentar:
Posting Komentar