Print to PDF from Data Validation Drop Down

Chelsea0890

New Member
Joined
Sep 4, 2017
Messages
2
I am trying to Print to PDF from a data validation list.
I have a pay summary sheet that auto fills when i select the employees name from a drop down list in Cell C6. I need to be able to print off each persons pay summary without having to manually select each persons name
Currently i have a macro for the Print to PDF but have to select from the drop down each time. Is there a macro that will run through the whole data validation list?

The Data validation is in cell C6.

Thanks in Advance!
Chelsea
 

Excel Facts

Excel Can Read to You
Customize Quick Access Toolbar. From All Commands, add Speak Cells or Speak Cells on Enter to QAT. Select cells. Press Speak Cells.
Welcome to the forum!

Did you need each one as a pdf or all as one pdf?

For the latter case, here is an example. https://www.dropbox.com/s/xh85s0l4o0bbwgd/PaySlips.xlsm?dl=0

For the case of one each, one can simply iterate each item in the named range. Since that is unlikely to change in the data validation list, you can hard code that in. I guess that you have a sheet change event to trigger the pdf creation.
 
Upvote 0
Change the myList to the named range in your data validation. Run from the activesheet with C6 list.
Code:
Sub Main()
  Dim c As Range
  For Each c In myList
    Range("C6").Value2 = c
  Next c
End Sub
 
Last edited:
Upvote 0

Forum statistics

Threads
1,223,714
Messages
6,174,055
Members
452,542
Latest member
Bricklin

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