DateTimePicker

G

Guest

I want to add a datetimepicker into a form. I have found many articles about
using the datetimepicker class, but I cannot find anything in my version of
Excel (XP) or MS VB (v6.3). Is there some place I can download the addin
file so that my machine will have this capability.

What I want is...

A user (not necessarily on my machine) clicks a button. The button will
cause a date/time picker pop up. When the user selects a date and time this
date and time will be set in a variable.

As an alternative, I'd like some code that will ask for user input in
"m/dd/yy hh:mm:ss" format and then verify that it is a proper date/time.

Thanks in advance for the input.

Mike
 
R

RB Smissaert

This is some text I wrote for an add-in I made:

On some systems there might be a missing file called MSCal.OCX. This is a
file for the calendar control used by the add-in.
If the calendar control works fine you can forget about the next bit.
If the calendar control doesn't work you will have to do as follows:

Put the file MSCal.OCX in the folder where your Windows system file.
Register the file by doing:
Start
Run
regsvr32 C:\WINDOWS\SYSTEM32\mscal.ocx or similar depending where the
mscal.ocx file is

Start Excel
Alt F11
Tools
References
Find Microsoft Calendar Control 10.0 and tick it
You may have to restart Excel to make it work.

Some systems may need the older version of the mscal.ocx file, version 8.0.
This should be somewhere on the C drive or
on the Office installation disk. I think this file comes with Access, so if
you have Office Standard, you may have to
download this file from the internet.
All the different versions of the calendar control are available from this
website:
http://www.fontstuff.com/vba/vbatut07.htm
Click on the link in the top left in the box Get the Calendar Control.

RBS
 
R

RB Smissaert

Forgot to say that it is worth it to look at that link even if you have the
..ocx file.

RBS
 

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

Similar Threads


Top