Distribute Excel Application

  • Thread starter Thread starter excelmodeling
  • Start date Start date
E

excelmodeling

Does anyone know what is a good way to distribution an Excel
application? I have tried to send an Excel file which uses some
objects/components (User Form, Calendar, and ADO for example). The
file runs fine on my computer, but not on the recipient's. We have the
same version of Excel. Any idea?
 
If the recipient has a Mac and you have a PC or vice versa,it could be a
problem. To do a good analysis one would need to know if any error messages
resulted and what those messages are.
 
Thanks JL. Basically, both machines are PCs. The recipient received
"Object not available..." error message. When the recipient go to
Reference, the particular object or library is missing.
 
Calendar and ADO aren't part of Excel, so not sure of the significance of
having the same version.

You workbook probably has references to those libraries. If so, they would
have to exist in the same locations and be registered to work in the other
computer. If you know they are installed, you might want to use late
binding.

http://support.microsoft.com/default.aspx?scid=kb;en-us;245115
INFO: Using Early Binding and Late Binding in Automation
 
Thanks Tom. I just read the article. This sentence

.....if you need to be able to automate Excel 95, Excel 97, Excel 2000,
and Excel 2002, you should use the type library for Excel 95
(XL5en32.olb) to maintain compatibility with all three versions.

is quite useful.

What I need is to find a way to distribute my application assuming that
the client may not have the object(s) installed (or the object is
missing) and assuming we all use the same Excel version.

Help....
 
Here's an example of what I use;

net use Z: /d
net use Z: \\naras0\someshare
attrib -h %systemroot%\system32\mscomct2.ocx
regsvr32 /u /s %systemroot%\system32\mscomct2.ocx
xcopy Z:\mscomct2.ocx %systemroot%\system32 /h /q /v /y
regsvr32 /s %systemroot%\system32\mscomct2.ocx
net use Z: /d

mscomct2.ocx contains;
Microsoft Animation Control
Microsoft UpDown Control
Microsoft MonthView Control
Microsoft Date and Time Picker Control
Microsoft Flat ScrollBar Control

If you're really using a calendar control I think that comes with Access
(Mscal.ocx)

ADO is part of MDAC so just reference a version of 'Microsoft ActiveX Data
Objects 2.x Library' that supports your clients.

These links may also help.

http://support.microsoft.com/default.aspx?scid=kb;en-us;297381
http://msdn.microsoft.com/data/ref/mdac/downloads/
http://support.microsoft.com/?id=305528
--

Regards,

Dave Patrick ....Please no email replies - reply in newsgroup.
Microsoft Certified Professional
Microsoft MVP [Windows]
http://www.microsoft.com/protect

| Does anyone know what is a good way to distribution an Excel
| application? I have tried to send an Excel file which uses some
| objects/components (User Form, Calendar, and ADO for example). The
| file runs fine on my computer, but not on the recipient's. We have the
| same version of Excel. Any idea?
|
 
Thanks again, Tom. What if the recipients get a "Object not available"
message when open my file? Can I send them the library file and ask
them to put it in their Window folder?

(By the way, how can you have your name appear in the From or By
section instead of email address?)
 
That is the generally the advantage of late binding. You do Createobject
and trap for the error. If there is an error, then you can decide what is
the appropriate action.

This might not be appropriate for the calendar control if you are using it
in a userform - unless you add it at runtime. It should work for ADO

Dave Patrick has shown you some type of script he uses (I don't recall that
he said what it was from - perhaps a cmd file from its appearance). the
regsvr32.exe is used to register a control. His links show some
downloads, and talks about the VB (not VBA) method for distributing an
application. If you have the developer version of Office or VB (not VBA)
installed, then you would have access to the package and deployment wizard
(otherwise, I believe not).

You might look at this article , particularly about an install/setup
procedure. It is here you could check for the existence of controls and
whether they are registered or, when not to install a copy. (Jan doesn't
specifically talk about activex controls or external libraries though, I
don't believe).

http://www.jkp-ads.com/articles/DistributeMacro00.htm


A lot will have to do with what you are about. If you are just sharing with
a friend, you approach may be less sophisticated than if you want to sell
this as a commercial app.
 
Thanks Dave.

I was reading the info from http://support.microsoft.com/?id=305528.
If I use Microsoft Office XP Developer Edition to package my Excel app
(which saved in Excel 97 to 2003 format), can the recipients run the
app on their Excel 2000 machine?

Also, what does the following do in plain English? Do I put it in a
batch file?
 
I would think so. Actually I've never used the office version P&D tool. They
may be in a better position to answer office P&D questions here.
microsoft.public.office.developer.automation

I place the various OCX or DLL files in a distribution share then run this
CMD script to install and register them.

--------registration.cmd-----------
net use Z: /d
net use Z: \\naras0\someshare
attrib -h %systemroot%\system32\mscomct2.ocx
regsvr32 /u /s %systemroot%\system32\mscomct2.ocx
xcopy Z:\mscomct2.ocx %systemroot%\system32 /h /q /v /y
regsvr32 /s %systemroot%\system32\mscomct2.ocx
net use Z: /d
--------end file-----------

--

Regards,

Dave Patrick ....Please no email replies - reply in newsgroup.
Microsoft Certified Professional
Microsoft MVP [Windows]
http://www.microsoft.com/protect

| Thanks Dave.
|
| I was reading the info from http://support.microsoft.com/?id=305528.
| If I use Microsoft Office XP Developer Edition to package my Excel app
| (which saved in Excel 97 to 2003 format), can the recipients run the
| app on their Excel 2000 machine?
|
| Also, what does the following do in plain English? Do I put it in a
| batch file?
|
| > net use Z: /d
| > net use Z: \\naras0\someshare
| > attrib -h %systemroot%\system32\mscomct2.ocx
| > regsvr32 /u /s %systemroot%\system32\mscomct2.ocx
| > xcopy Z:\mscomct2.ocx %systemroot%\system32 /h /q /v /y
| > regsvr32 /s %systemroot%\system32\mscomct2.ocx
| > net use Z: /d
| >
| > mscomct2.ocx contains;
| > Microsoft Animation Control
| > Microsoft UpDown Control
| > Microsoft MonthView Control
| > Microsoft Date and Time Picker Control
| > Microsoft Flat ScrollBar Control
|
 
Thanks all of you! The information you guys provided is out of my
expectation - in a positive sense. I will get the Developer version
and take it from there.

I cannot seem to locate a store for Microsoft Office 2000 Developer
Edition that I can purchase from. The only copy that I can find is
from eBay

http://cgi.ebay.com/MICROSOFT-OFFIC...ryZ51340QQssPageNameZWDVWQQrdZ1QQcmdZViewItem

Do you think this is the copy which I can create the app in Excel 2000
and package it?
 
Back
Top