How to Export Excel file to PDF and Save in Folder by using VBA Button

 How to Export Excel file to PDF and Save in Folder by using VBA Button 

  • Open a new excel file
  • Click on developer tab
  • Click on visual basic tab


  • Click on Insert tab
  • Click on Module tab
  • Paste VBA Code
  • Replace Folder path 


  • Save this file in Excel Macro enabled work book format. OR
  • Save it in Excel Add-ins format.

  • Paste that saved file in below folder path (in C drive)


  • Do right Click on any free white space.
  • A new option list will be Opened
  • Click on Customize ribbon. 

  • Select Macro
  • Select Main Tab
  • Select Home Tab
  • Click on New Group
  • Do Rename created New Group
  • Select New Group
  • Select VBA Code ( Ex. SaveActiveSheetAsPDF...)
  • Click on Add button.
  • Click on New TAB under new group
  • Do Rename of New Tab.
  • Select any Icon for new Tab and click on ok



  • A New Button with VBA code will be created under home tab in all excel sheet.

  • Select print range by using page set-up under page Layout tab.

  • Click on button & file will be exported in folder.


  •     Exported PDF file will be placed in folder.


  • Sample file


Thank you

Comments

Popular posts from this blog

How to Use the FILTER Formula

Using Flash Fill in Excel

Skill Matrix Tool & Excel Format