How to Calculate dates?

  • Thread starter Thread starter Martein Steinmann
  • Start date Start date
M

Martein Steinmann

Hi,

I would like to create some sort of form in Microsoft Word where I can enter
a start date in a field. After doing that I would like to have 2 dates to be
calculated in 2 other fields:

e.g.

Start date [ 18-11-2003 ]
Name [ Jack]
Hobby [ Tennis ]
Water date [ 28-11-2003 ] <- ten days after the start date automatically
generated.
Fire date [ 30-11-2003 ] <- twelve days after the start also automatically
generated.

Now I have been browsing around on Google groups and see some solutions
which come close, but they all use the current date, not use forms, or
assume that you are an experienced VBA-user (which i'm not).

I'd really appreciate an answer.

Bye,

Martein
 
Hi Martin,

The functions you need to use are DateAdd and DateDiff. There are code
examples in the VBA Help files which will point you in the right firection.

--
Regards
Jonathan West - Word MVP
MultiLinker - Automated generation of hyperlinks in Word
Conversion to PDF & HTML
http://www.multilinker.com
 
Hi,

For a downloadable Word document that uses fields, rather
than macros, to insert future/past dates, and much more,
go to:
http://www.wopr.com/cgi-bin/w3t/showflat.pl?
Cat=&Board=wrd&Number=249902
I'm sure you'll find what you want there.

Cheers
PS: Remove NO.SPAM from the above before replying.
PPS: Is there any forum where you DIDN'T cross-post this?
 
Back
Top