Excel vba print multiple ranges to pdf

(Using Excel) Is there way to do that in the macro. What I would like to do is have these combined into one PDF file. ExampleVBA to Print Multiple Ranges to PDFTo print more than one worksheet, you can put the worksheet names in an array like this. Explanat