ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Add a date to a Userform (https://www.excelbanter.com/excel-programming/443101-add-date-userform.html)

ordnance1[_2_]

Add a date to a Userform
 
I am using Office 2010 in advance of roll-out in our organization. I have
been testing some of our VBA enabled templates for compatibility and have
run into a problem. Specifically a lose of the Calendar control. Since we
have a number of Userforms that use the calendar control, I need to come up
with some sort of replacement. Any suggestions? I thought there was a date
picker control, but I can not find it (I have installed the complete Office
2010 Professional Plus)


joel[_1002_]

Add a date to a Userform
 

The calendar control uses the library

c:\program Files\Microsoft Office\Office13\MSAL.OCX


Usually the 1st time you use a control like the Calendar control on a
PC you need to right click the userfrom Toolbox and select "additional
controls". Then choose Calendar control by clicking the X and pressing
ok. the control will then be added to the toolbox. Then you can add
the control to a userform from the toolbox. When you do this in the VBA
menu tools - References and library is automatically added as a
rerference.


Sometimes after an update to a PC the reference doesn't get updated to
point to the newer version of office. Then you have to browse for the
library by going to the VBA menu Tools - References - Browse, select the
calendar control, and look for the location of the MSAL.OCX. Usually I
will go to a Window browser and try to locate the file by doing a search
in the Program Files folder before I add the refence to the VBA menu to
make sure the file exists.

There are ways of automatically adding the reference to workbook using
a macro but I would have to do a little research to find the macro. I
also believe this can be done in a window script.


--
joel
------------------------------------------------------------------------
joel's Profile: http://www.thecodecage.com/forumz/member.php?u=229
View this thread: http://www.thecodecage.com/forumz/sh...d.php?t=207317

http://www.thecodecage.com/forumz


p45cal[_283_]

Add a date to a Userform
 

Can't speak for 2010 but in 2007 it's
In the Controls Toolbox, right-click in some empty space and choose
*Additional Controls…*, in the ensuing list it is called:
MICROSOFT DATE AND TIME PICKER CONTROL 6.0 (SP4)


ordnance1;738644 Wrote:

I am using Office 2010 in advance of roll-out in our organization. I
have
been testing some of our VBA enabled templates for compatibility and

have
run into a problem. Specifically a lose of the Calendar control. Since

we
have a number of Userforms that use the calendar control, I need to

come up
with some sort of replacement. Any suggestions? I thought there was a

date
picker control, but I can not find it (I have installed the complete

Office
2010 Professional Plus)



--
p45cal

*p45cal*
------------------------------------------------------------------------
p45cal's Profile: http://www.thecodecage.com/forumz/member.php?u=558
View this thread: http://www.thecodecage.com/forumz/sh...d.php?t=207317

http://www.thecodecage.com/forumz


ordnance1[_2_]

Add a date to a Userform
 
Thanks

I have done what you suggested (had run regsvr32 in both the
Windows\system32 and the windows\syswow64 folders. I was able to select
mscal.ocx (tools, reference, browse) and the checl Calendar Control 11, but
when I select additional tools Calendar Control still is not listed. BTW
this is Office 14 (2010).

"joel" wrote in message
...

The calendar control uses the library

c:\program Files\Microsoft Office\Office13\MSAL.OCX


Usually the 1st time you use a control like the Calendar control on a
PC you need to right click the userfrom Toolbox and select "additional
controls". Then choose Calendar control by clicking the X and pressing
ok. the control will then be added to the toolbox. Then you can add
the control to a userform from the toolbox. When you do this in the VBA
menu tools - References and library is automatically added as a
rerference.


Sometimes after an update to a PC the reference doesn't get updated to
point to the newer version of office. Then you have to browse for the
library by going to the VBA menu Tools - References - Browse, select the
calendar control, and look for the location of the MSAL.OCX. Usually I
will go to a Window browser and try to locate the file by doing a search
in the Program Files folder before I add the refence to the VBA menu to
make sure the file exists.

There are ways of automatically adding the reference to workbook using
a macro but I would have to do a little research to find the macro. I
also believe this can be done in a window script.


--
joel
------------------------------------------------------------------------
joel's Profile: http://www.thecodecage.com/forumz/member.php?u=229
View this thread:
http://www.thecodecage.com/forumz/sh...d.php?t=207317

http://www.thecodecage.com/forumz


ordnance1[_2_]

Add a date to a Userform
 
I may have solved my problem. Having followed all advice offered I got
mscal.ocx registered but it seems it will only work on the 32 bit version of
office 2010 (I am testing both versions for compatibility). If anyone has a
solution to get it to work in Office 2010 (64 bit) I would love to hear
about it. IT department is insistent they want to run the 64 bit version
since they migrated to Win7 64 bit.

"ordnance1" wrote in message
...
Thanks

I have done what you suggested (had run regsvr32 in both the
Windows\system32 and the windows\syswow64 folders. I was able to select
mscal.ocx (tools, reference, browse) and the checl Calendar Control 11,
but when I select additional tools Calendar Control still is not listed.
BTW this is Office 14 (2010).

"joel" wrote in message
...

The calendar control uses the library

c:\program Files\Microsoft Office\Office13\MSAL.OCX


Usually the 1st time you use a control like the Calendar control on a
PC you need to right click the userfrom Toolbox and select "additional
controls". Then choose Calendar control by clicking the X and pressing
ok. the control will then be added to the toolbox. Then you can add
the control to a userform from the toolbox. When you do this in the VBA
menu tools - References and library is automatically added as a
rerference.


Sometimes after an update to a PC the reference doesn't get updated to
point to the newer version of office. Then you have to browse for the
library by going to the VBA menu Tools - References - Browse, select the
calendar control, and look for the location of the MSAL.OCX. Usually I
will go to a Window browser and try to locate the file by doing a search
in the Program Files folder before I add the refence to the VBA menu to
make sure the file exists.

There are ways of automatically adding the reference to workbook using
a macro but I would have to do a little research to find the macro. I
also believe this can be done in a window script.


--
joel
------------------------------------------------------------------------
joel's Profile: http://www.thecodecage.com/forumz/member.php?u=229
View this thread:
http://www.thecodecage.com/forumz/sh...d.php?t=207317

http://www.thecodecage.com/forumz



All times are GMT +1. The time now is 09:58 AM.

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