VBA to cycle through drop down list and save as pdf with file name

Carla carla

New Member
Joined
Oct 29, 2022
Messages
47
Office Version
  1. 365
Platform
  1. Windows
Hello, I need help on saving my drop down list to individual pdf file with file name.
 

Excel Facts

Do you hate GETPIVOTDATA?
Prevent GETPIVOTDATA. Select inside a PivotTable. In the Analyze tab of the ribbon, open the dropown next to Options and turn it off
More details are required to help you. What type of the drop down is it? Where should the PDF files be saved (folder)?

See if you can adapt this code, which is for a data validation drop down.

 
Upvote 0
The drop down list- is a data validation list
Yes, the pdf must be saved in a folder
 
Upvote 0
More details are required to help you. What type of the drop down is it? Where should the PDF files be saved (folder)?

See if you can adapt this code, which is for a data validation drop down.

Hello, it worked for me! Thank you but one more thing how to they set the name of the file?
 
Upvote 0
The file name is the current Data Validation cell value, as it loops through each Data Validation value, set by this part of the code:

VBA Code:
Filename:=destinationFolder & dvValueCell.Value & ".pdf"

Is there anyway for me to change the filename, ID number too dificult
 
Upvote 0
If each ID number is related to a value in a table, maybe you could have a LOOKUP/VLOOKUP formula whose result the code reads to use as the file name. But we need more information about your exact sheet layout and details to do that - posting your sheet(s) with the XL2BB add-in would help.
 
Upvote 0

Forum statistics

Threads
1,216,419
Messages
6,130,515
Members
449,585
Latest member
kennysmith1

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