473,396 Members | 1,892 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

VBA Calendar Controls

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
7 6219
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
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
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
<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
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
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
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Phil Bouadana | last post by:
I have 2 calendar controls on a ASP.NET webform. I select 1 date from each and I'd like to: 1a) Count the number of days between the given dates 1b) Count the number of days between the given...
3
by: Steve Drake | last post by:
All, I have a CONTROL that contains 1 control (Control ONE), the 1 control that it can contain 1 or 2 control (Control A and B). Control A, raises and event and Control ONE receives this event...
0
by: KJBaham | last post by:
Hi, I've created many MS Access databases that report info from a DB2/400 system here, and I am trying to learn to put these into web applications. I am using the following walkthrough as a guide...
4
by: ¿ Mahesh Kumar | last post by:
Hi groups, I'm following Master page concept of ASP.NET 2.0, in which I'm deriving all the following page from master page for Theme. So unfortunately i'm dont get any Form Tag in my derived...
1
by: P K | last post by:
I have around 20 calendar controls on my screen besides 20 textboxes. The functionality of each control is the same, they take in a parameter for the textbox name and open a calendar in a popup....
0
by: Tina | last post by:
when a calendar control renders, it already has the following for each day in the month... "><a href="javascript:__doPostBack('Calendar1','2220')" --2220 being the day I want to replace that...
0
by: MasterChief | last post by:
I have a piece of code that is grabbing todays month and then spitting out the next 6 months into a menu on a Master page. How do I get it so that When somebody clicks on say December it changes...
0
by: =?Utf-8?B?VG9tIE5vd2Fr?= | last post by:
I want to build a form that contains two calendar controls. When the user clicks dates on both, I want to go to a database and get records that were added between the two dates. I am having...
0
by: pradeepnswamy | last post by:
I cannot get the values of the second calendar control to the textbox, it changes to the first calendar controls value automatically...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.