Adding .ocx to a VBA-project

S

Stefan

I'm creating a form where you can pick a startdate and
enddate. I did put a calendar control in it to perform
these actions. The problem is that when I open the
program on another computer with another version of excel
the calender element doesn't work anymore.
So now I'm trying to put the same mscal.ocx on every
computer, but that doesn't seem to work either. Does
anybody have a solution for this problem? Help?
 
D

David Stumbles

G'day Stefan,

This User Group is actually for Microsoft Project, not
Excel. However, having dealt with this previously, I think
I can help.

Simply copying mscal.ocx to the other computer is not
enough. You also need to reference it on that computer.

This is easily done within the VBE, by
selecting "Tools", "References". Search the list
for "Microsoft Calendar Control". Select it (ensuring it
gets a "tick" in the box) and then hit "OK".

If it is not in the list, select "Browse", select ".ocx"
from the "Files of type" box, ensuring that you are also
in the "C:\WINNT\SYSTEM32" directory (for Windows 2000 or
whatever appropriate directory for your version. It should
default to the correct one). Find mscal.ocx in the list of
files and select "Open". This should make it appear in the
list and should also select it. If so, you can hit "OK".

Any file referencing the calendar control should now work
on that PC.

Let me know if it doesn't.

Dave.
 

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

Top