Inptbox to give print dates

N

NicoCaps

Hi all,

I'd like the users of the plannings to be able to print out in pdf format.
Since it's a generic macro I want them to input the dates where the prints
should begin and end. Here's the small code I'm struggling with. Can anyone
tell me where my error is?

Thanks

Nico

Sub Print
Dim StartDate As Variant
Dim EndDate As Variant
StartDate = InputBox("Enter Start Print date")
EndDate = InputBox("Enter End Print date")
FilePrintSetup "PDFCreator"
FilePrint FromDate:="StartDate", ToDate:="EndDate"

End Sub
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top