VBA Code ‘ Convert active excel workbook to PDF & save to the same folder as the workbook ( any user )

Sallyfomthevalley

New Member
Joined
Feb 2, 2018
Messages
14
Hi there... please help! I have been searching for over a week for answers to my query with no luck and I wondered if anyone can help me here please, I’d be so thankful.

1. I have created a time sheet in excel for a client, (macros.. command buttons, all new to me) I would like to add a command button that converts the time sheet to PDF and saves the PDF to the same location as the time sheet workbook, I have managed to save it to my PC, but I would like a default directory path that would work for anyone the time sheet is sent to.

2. The second command button I need is a button the user can click in the active time sheet that creates a blank timesheet.. again, I had a go but all I can get is a new excel workbook, no template.

Please if there are any geniuses out there that can help me sleep tonight and take this worry from my mind I would be forever thankful.
 

Excel Facts

Pivot Table Drill Down
Double-click any number in a pivot table to create a new report showing all detail rows that make up that number
What is the range of template that should be saved? For example A1 to J25.

Is the template range static or will it change?

So you want the Excel File saved and then a PDF copy created and Saved to the Desktop?

On your request 2, do you mean like clear the template to a fresh state or actually create a new sheet and insert a new blank template?
 
Upvote 0

Forum statistics

Threads
1,215,335
Messages
6,124,327
Members
449,155
Latest member
ravioli44

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