Userform Calendar

  • Thread starter Thread starter Charles
  • Start date Start date
C

Charles

I have a userform calendar and and would like to add 7 or more working
days the date value of the calendar.
I've looked for answers on this forum and tried to adapt the codes
found, but was unable too.
Any help or suggestions would be appreciated.
 
I have a userform calendar and and would like to add 7 or more working
days the date value of  the calendar.
I've looked for answers on this forum and tried to adapt the codes
found, but was unable too.
Any help or suggestions would be appreciated.

Charles,

Do you have any existing code that you could post? Your post is a bit
vague. Is the calendar a custom user form you created that acts as a
calendar control? Is it the built-in calendar control?

Best,

Matthew Herbert
 
Charles,

Do you have any existing code that you could post?  Your post is a bit
vague.  Is the calendar a custom user form you created that acts as a
calendar control?  Is it the built-in calendar control?

Best,

Matthew Herbert

Thanks for the reply.
This is one of the codes I'm trying to use.
MyDate = "9/10/09"
MyWeekDay = WorksheetFunction.Weekday(MyDate) + 7

MyDate is the "Value" of the Calendar
This code returns a value of 12.
What I hoped it would do is add 7 working days to the date which would
then be "09/18/09"
 
Charles,

Set a reference to the Analysis Toolpak (atpvbaen.xls) and then use code like

Dim myDate As Date
myDate = Workday(CalendarDateValue, 7)
MsgBox Format(myDate, "mmmm d, yyyy")


where CalendarDateValue is the date value returned by the calendar.

HTH,
Bernie
MS Excel MVP
 
Charles,

Set a reference to the Analysis Toolpak   (atpvbaen.xls) and then use code like

Dim myDate As Date
myDate = Workday(CalendarDateValue, 7)
MsgBox Format(myDate, "mmmm d, yyyy")

where  CalendarDateValue is the date value returned by the calendar.

HTH,
Bernie
MS Excel MVP

Bernie,
Thanks. Your suggestion worked.
Also thanks to Matthew.
 
Back
Top