View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Tom Ogilvy Tom Ogilvy is offline
external usenet poster
 
Posts: 27,285
Default A challenge for the Excel Experts among us (ActiveX Control & Add-ins)

You can't easily embed a file in a workbook. You can distribute the file
with your workbook and have the code in your workbook check if it already
exists and if not, copy it to the users computer and register it.

You can use the shell command:

Windows 95: regsvr32.exe \windows\system\mscal.ocx

Windows NT: regsvr32.exe \windows\system32\mscal.ocx



Load the Analysis Toolpak - VBA, then in the VBE, select it in the Object
Viewer and look at the functions within.

--
Regards,
Tom Ogilvy

"JMMach" wrote in message
...
Hello Ladies & Gentlemen,
1. Is there a way in Excel 2000 thru to Excel 2003 to take an ActiveX
control (MSCAL.OCX) and attach it to a project as an Add-in?
What are the procedures for doing this.
Or at the very least I would like to put a copy of that file into a folder
that I specify, and when the Excel file requiring that ActiveX is opened,
use the Open event to make sure that the reference of that ActiveX points

to
my specified folder. What would be the code that accomplishes this.
By way of background, what led to this question is an Excel project (Excel
file automated with VBA) file that used the MSCAL.OCX control on a

UserForm.
Then came the day when the user got a new computer, and when the form was
opened the Calendar control just vanished. I determined that MSCAL.OCX was
missing from her workstation. I was able to get the OCX file, put it on

her
workstation, and restore the UserForm from a backup copy in a zipped file.
But I want to avoid such a problem in the future.

2. Does anyone know if a list of the common reference libraries used by
Excel exists, and more importantly, along with the list are details of the
contents of such libraries. For example, the Analysis Toolpak is one

Add-in
that is common, but I have not been able to find any document that tells

me
what functions it contains. And knowing that would be very helpful.

Are these questions too tough, or will someone rise to the challenge.
Thanks in advance.
TTFN
JMMach