VBA correct syntax

T

Tracy L

I am trying to create a simple button that will print the current view equal
to the current date plus 3 months rather than having to adjust the date
manually in VBA.

FilterApply Name:="JSM Projects"
FilePrint FromPage:=1, ToDate:="09/01/2006"


Since I am new to VBA I am thinking that it should be something like

DIM printDate
printDate = Now + 90d

FilterApply Name:="JSM Projects"
FilePrint FromPage:=1, ToDate:=printDate

This however does not work any help would be greatly appreciated.
Thanks
 
M

Mike Glen

Hi Tracy,

Next time, try posting on the developer newsgroup. Please see FAQ Item: 24.
Project Newsgroups. FAQs, companion products and other useful Project
information can be seen at this web address:
http://project.mvps.org/faqs.htm

Mike Glen
Project MVP
 
T

Tracy L

Thanks very helpful. Does the VBA act as the application object in this case
and dateAdd as a function of VBA or Application?
Thanks TL


thanks
 

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