Hi excelforum Experts,
I have a separate excel macro workbook that contains two buttons named "Consolidate" and "Print PDF" respectively. I would like to focus on the "Print PDF" button since the other button works fine though it is not incorporated into the excel macro that I have mentioned or as attached.
I am having an error upon running the macro as shown on screenshot below and I could not find what's wrong with the code or I might overlooked some codes here. I appreciate if there could be someone that would help me figure these things out. Please see screenshots below for reference:
Run-time Error.png
Working VBA Code.png
Here are the factors that I need to consider in order to arrived at my desired output. Please see also attached workbooks for reference:
1.) The "Print PDF" button will work on the other open/ active workbook. This workbook is an output of my "Consolidated" button.
2.) Each worksheet has fluctuating number of rows and columns, so I need to Set Print Areas ALL worksheets before converting to PDF.
3.) Each worksheet name will be used as file name and all worksheets will be saved to my desired file path.
Warmest regards,
Arnel
Bookmarks