ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Userform Calendar (https://www.excelbanter.com/excel-programming/432567-userform-calendar.html)

Charles

Userform Calendar
 
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.


Matthew Herbert

Userform Calendar
 
On Aug 18, 12:20*pm, Charles wrote:
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

Userform Calendar
 
On Aug 18, 1:43*pm, Matthew Herbert wrote:
On Aug 18, 12:20*pm, Charles wrote:

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


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"


Bernie Deitrick

Userform Calendar
 
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" wrote in message
...
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

Userform Calendar
 
On Aug 18, 2:01*pm, "Bernie Deitrick" <deitbe @ consumer dot org
wrote:
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" wrote in message

...

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.


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


All times are GMT +1. The time now is 04:10 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com