Userform Calendar

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.
 
M

Matthew Herbert

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
 
C

Charles

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"
 
B

Bernie Deitrick

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
 
C

Charles

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.
 

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