By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,827 Members | 2,220 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,827 IT Pros & Developers. It's quick & easy.

VBA Calendar Controls

P: n/a
Does anyone know of any good 3rd party calendar controls that can be
used in VBA? I am trying to find a calendar control that will allow
you to select multiple dates at once or a range of dates, such as a
week or month. Thanks.

May 10 '06 #1
Share this Question
Share on Google+
7 Replies


P: n/a
DFS
Vincent wrote:
Does anyone know of any good 3rd party calendar controls that can be
used in VBA? I am trying to find a calendar control that will allow
you to select multiple dates at once or a range of dates, such as a
week or month. Thanks.


Vincent, meet Stephan Leban's free, code-only calendar control

http://www.lebans.com/monthcalendar.htm

May 10 '06 #2

P: n/a
Thanks, DFS. This will work great. However, I was wondering if you
knew how to deactivate the menu controls at the top of the calendar.
I'd rather control the layout of the calendar in code. Thanks.

-Vincent

May 10 '06 #3

P: n/a
DFS
Vincent wrote:
Thanks, DFS. This will work great. However, I was wondering if you
knew how to deactivate the menu controls at the top of the calendar.
I'd rather control the layout of the calendar in code. Thanks.
I didn't develop it, of course, but Stephan Lebans has been pretty
responsive and still reads cdma, so maybe he'll answer.
I made some slight changes to his calendar code and my usage of it looks
like this:

http://www.angelfire.com/planet/dfs0...s_calendar.PNG

-Vincent

May 10 '06 #4

P: n/a
<However, I was wondering if you
knew how to deactivate the menu controls at the top of the calendar.>

Did you find away to deactivate the menu controls at the top of the
calendar. I need to do this as well


"DFS" <nospam@dfs_.comwrote in message
news:5p*******************@bignews1.bellsouth.net. ..
Vincent wrote:
>Thanks, DFS. This will work great. However, I was wondering if you
knew how to deactivate the menu controls at the top of the calendar.
I'd rather control the layout of the calendar in code. Thanks.

I didn't develop it, of course, but Stephan Lebans has been pretty
responsive and still reads cdma, so maybe he'll answer.
I made some slight changes to his calendar code and my usage of it looks
like this:

http://www.angelfire.com/planet/dfs0...s_calendar.PNG

>-Vincent


Jul 6 '06 #5

P: n/a
Sorry, I did not.

-Vincent

Aikon wrote:
<However, I was wondering if you
knew how to deactivate the menu controls at the top of the calendar.>

Did you find away to deactivate the menu controls at the top of the
calendar. I need to do this as well


"DFS" <nospam@dfs_.comwrote in message
news:5p*******************@bignews1.bellsouth.net. ..
Vincent wrote:
Thanks, DFS. This will work great. However, I was wondering if you
knew how to deactivate the menu controls at the top of the calendar.
I'd rather control the layout of the calendar in code. Thanks.
I didn't develop it, of course, but Stephan Lebans has been pretty
responsive and still reads cdma, so maybe he'll answer.
I made some slight changes to his calendar code and my usage of it looks
like this:

http://www.angelfire.com/planet/dfs0...s_calendar.PNG

-Vincent
Jul 7 '06 #6

P: n/a
An Experts Exchange member has shown me a means of preventing the properties
bar from showing by commenting out a single line. I am still researching
away to not show the window title from within Stephens Calendar API. I know
Stephen is a regular member here and so I posted a new thread here in hopes
that Stephen may enlighten me.

Anyway, you can prevent the property bars from showing by commenting out the
following 2 lines in the ShowCalander procedure located in modCalendar:

--------------------------------------------------------------------------------------------------

'lngRet = InsertMenu(hMenu, 2&, MF_POPUP Or MF_BYPOSITION Or MF_ENABLED,
hMenuPopMisc, "Properties")

' Let's add Top level Menu Item that does not contain any submen items.

' We will use it like a CommandButton to allow the users to Close the
Calendar Window.

'lngRet = InsertMenu(hMenu, 1&, MF_BYPOSITION Or MF_ENABLED, 998, "Close
Window")

----------------------------------------------------------------------------------------------------


"Vincent" <an**********@verizon.netwrote in message
news:11**********************@s53g2000cws.googlegr oups.com...
Sorry, I did not.

-Vincent

Aikon wrote:
><However, I was wondering if you
knew how to deactivate the menu controls at the top of the calendar.>

Did you find away to deactivate the menu controls at the top of the
calendar. I need to do this as well


"DFS" <nospam@dfs_.comwrote in message
news:5p*******************@bignews1.bellsouth.net ...
Vincent wrote:
Thanks, DFS. This will work great. However, I was wondering if you
knew how to deactivate the menu controls at the top of the calendar.
I'd rather control the layout of the calendar in code. Thanks.

I didn't develop it, of course, but Stephan Lebans has been pretty
responsive and still reads cdma, so maybe he'll answer.
I made some slight changes to his calendar code and my usage of it
looks
like this:

http://www.angelfire.com/planet/dfs0...s_calendar.PNG


-Vincent


Jul 8 '06 #7

P: n/a
I have research the user32.dll properties on MSDN and other threads here and
it turns out that Stephens's code already exposes the property for
determining if a title bar is shown (or not shown). I am including the code
changes needed to prevent the title bar and the menu mars from being
displayed in the event anyone else may be interested.

To prevent the title bar for being displayed change the following coded as
follows:

In modCalendar - declarations change Private Const WS_OVERLAPPEDWINDOW to:

Private Const WS_OVERLAPPEDWINDOW As Long = (WS_OVERLAPPED Or WS_BORDER Or
WS_SYSMENU Or WS_THICKFRAME Or WS_MINIMIZEBOX Or WS_MAXIMIZEBOX)

Change "Public Function ShowMonthCalendar" to:

hWnd = CreateWindowEx(lngEXStyle, _

CLASSNAME, _

TITLE, _

WS_POPUPWINDOW Or WS_BORDER, _

CW_USEDEFAULT, _

CW_USEDEFAULT, _

CW_USEDEFAULT, _

CW_USEDEFAULT, _

mc.hWndForm, _

hMenu, _

hInstance, _

0&)

To hide the menu bars, comment out the following lines found in
modCalendar - ShowCalendar:

' Misc Properties Menu

'## lngRet = InsertMenu(hMenu, 2&, MF_POPUP Or MF_BYPOSITION Or
MF_ENABLED, hMenuPopMisc, "Properties")

'## lngRet = InsertMenu(hMenu, 1&, MF_BYPOSITION Or MF_ENABLED, 998, "Close
Window")

This is a crud fix and disables some niceties included in Stephen's original
code and also requires for some properties to be set in code. It should be
easy enough for me to add some additional code that will allow me my
modified version or the more robust version included in the original code.

"Aikon" <ea********@bellsouth.netwrote in message
news:Aq******************@bignews2.bellsouth.net.. .
An Experts Exchange member has shown me a means of preventing the
properties bar from showing by commenting out a single line. I am still
researching away to not show the window title from within Stephens
Calendar API. I know Stephen is a regular member here and so I posted a
new thread here in hopes that Stephen may enlighten me.

Anyway, you can prevent the property bars from showing by commenting out
the following 2 lines in the ShowCalander procedure located in
modCalendar:

--------------------------------------------------------------------------------------------------

'lngRet = InsertMenu(hMenu, 2&, MF_POPUP Or MF_BYPOSITION Or MF_ENABLED,
hMenuPopMisc, "Properties")

' Let's add Top level Menu Item that does not contain any submen items.

' We will use it like a CommandButton to allow the users to Close the
Calendar Window.

'lngRet = InsertMenu(hMenu, 1&, MF_BYPOSITION Or MF_ENABLED, 998, "Close
Window")

----------------------------------------------------------------------------------------------------


"Vincent" <an**********@verizon.netwrote in message
news:11**********************@s53g2000cws.googlegr oups.com...
>Sorry, I did not.

-Vincent

Aikon wrote:
>><However, I was wondering if you
knew how to deactivate the menu controls at the top of the calendar.>

Did you find away to deactivate the menu controls at the top of the
calendar. I need to do this as well


"DFS" <nospam@dfs_.comwrote in message
news:5p*******************@bignews1.bellsouth.ne t...
Vincent wrote:
Thanks, DFS. This will work great. However, I was wondering if you
knew how to deactivate the menu controls at the top of the calendar.
I'd rather control the layout of the calendar in code. Thanks.

I didn't develop it, of course, but Stephan Lebans has been pretty
responsive and still reads cdma, so maybe he'll answer.
I made some slight changes to his calendar code and my usage of it
looks
like this:

http://www.angelfire.com/planet/dfs0...s_calendar.PNG


-Vincent



Jul 9 '06 #8

This discussion thread is closed

Replies have been disabled for this discussion.