View Single Post
  #2  
Old May 22nd 10, 06:23 AM posted to microsoft.public.outlook.program_vba
Michael Bauer [MVP - Outlook]
external usenet poster
 
Posts: 1,885
Default add a date without holidays



For adding days, use the DateAdd function. It won't return an invalid date
like 31/5.

The Weekday function returns the number of the day, for instance this
Weekday("22.05.2010" ,vbUseSystemDayOfWeek)

returns 6 for Saturday, tomorrow it will return 7 for Sunday.

For holidays I can't help off head.

--
Best regards
Michael Bauer - MVP Outlook
Category Manager - Easily share your categories:
SAM - Automatically choose sending account, signature, and sent message
folder:
http://www.vboffice.net/product.html?lang=en


Am Fri, 21 May 2010 11:30:01 -0700 schrieb Christian W:

Hi friends,

I have a problem, in a macro I need to calculate a date adding working

days
only.

This add not include saturday / sundays and holidays.

For example:

21/5 + 6 days = 31/5


How i can to do ?

Thanks in advance and sorry by my english,
Christian

Ads