Thanks Macropod and Graham Mayor. I have followed your field codes and tip
concerning calculating dates in a Word document. Works very well so now I can
choose among four different delay days from a field list box and let the Date
Calc code calculate from that.
I wanted to use Macropods field code examples (Date Calc) instead of macros
with VBA, because some friends that will use my documents not will deal with
VBA on their computers.
While it works so well I will try experimenting with the even more and
elegant code Handling Weekends and Holidays if a calculated date will end up
on a weekend or holiday.
But here in Sweden we have little different Holidays than in Australian
Capital Territory as in the code example.
We have not so many Holidays as in ACT, no Anzac and so on. Instead we have
some special Swedish Holidays. Christmas nearly the same, but our
correspondence day to Boxing Day is always on 26th December independent of
Saturday-Sunday. Easter seems to be the same. But then we have Ascension Day
as a holiday, always on a Thursday, calculated depending on Easter Day. And
then some Holidays on fixed dates. And some that always fall on a Saturday or
Sunday, so them I need not to calculate anyway.
I have some questions on how to change in the Following Business Day code by
Macropod to adapting for Swedish calendar:
1. Can I just erase from the code the ACT dependent holidays?
2. How to add code for Swedish holidays. Some hints..?
3. Do I have to change the SET Adj… code rows in any way?
Hoping for some hints…
/Silfver
"Graham Mayor" wrote:
> As Doug says it is easier to use a macro run on exit from a field to insert
> a required date, but it is also possible to use the numeric value from the
> dropdown field in the datecalc calculation. If we assume that the Dropdown
> field with the delays is bookmarked Dropdown1, set its calculate on exit
> check box and in the datecalculation use {SET Delay { REF Dropdown1 }}
>
> --
> <>>< ><<> ><<> <>>< ><<> <>>< <>><<>
> Graham Mayor - Word MVP
>
> My web site www.gmayor.com
> Word MVP web site http://word.mvps.org
> <>>< ><<> ><<> <>>< ><<> <>>< <>><<>
>
>
> Silfver wrote:
> > Concerning dates in Word Form and DateCalc 'tutorial':
> > Is there a way to call forand use the value from a form DropDown List
> > Box instead of use the SET Delay xx value in the field code given in
> > DateCalc examples?
> >
> > /Silfver
> >
> > *****
> >
> > "Graham Mayor" wrote:
> >
> >> Though my fellow MVPs have pointed the way, you might like to insert
> >> the date from a calendar - see
> >> http://www.gmayor.com/popup_calendar.htm
> >>
> >> --
> >> <>>< ><<> ><<> <>>< ><<> <>>< <>><<>
> >> Graham Mayor - Word MVP
> >>
> >> My web site www.gmayor.com
> >> Word MVP web site http://word.mvps.org
> >> <>>< ><<> ><<> <>>< ><<> <>>< <>><<>
> >>
> >>
> >> mbrancheau wrote:
> >>> Is there a way I can insert a date into a form field, and then have
> >>> that date update other, different dates? Specifically, I want the
> >>> people using my form to insert a project due date, then the form
> >>> will populate a timeline of different dates based on the due date
> >>> for when the steps of the project need to be completed.
> >>>
> >>> Thanks!
>
>
>