VBA to Export multiple Worksheets to PDF with window to select save location

Grimm127

Board Regular
Joined
Aug 17, 2011
Messages
132
Hi Excel Gurus,

I have a report with several worksheets and I need to export a few to pdf. So I would like to have a macro that selects a group of worksheets (ex: Sheet 1; Sheet 4, Sheet 8, etc) and exports to a pdf. However, I would prefer at the window pops up so I can name the pdf and set where the pdf will need to be saved to. Every month I have to save in an alternate location.

So I would go to file (in the ribbon), Export, Create PDF/XPS Document and click button to get to the window I am looking for.

Thank you all in advance.
 

Attachments

  • 8-13-2021 1-54-19 PM.jpg
    8-13-2021 1-54-19 PM.jpg
    31.7 KB · Views: 25
  • 8-13-2021 1-55-36 PM.jpg
    8-13-2021 1-55-36 PM.jpg
    110 KB · Views: 25

Excel Facts

Remove leading & trailing spaces
Save as CSV to remove all leading and trailing spaces. It is faster than using TRIM().

Forum statistics

Threads
1,224,827
Messages
6,181,200
Members
453,022
Latest member
RobertV1609

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top