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 How do I save an embedded item from a worksheet into a folder

As far as I know, there is only one file (mscal.ocx). To do it
manually, I just drop that file into the correct folder on their PC,
and then register it using VBA:

Shell ("regsvr32.exe mscal.ocx")


that is what I mean. You can't embed that file in your xls file.

When you install software produced by a commercial entity, there is usually
an install routine that does the above. If all you are doing is passing
around an xls, then you probably need to also pass the OCX and instructions
how to register it, or have them put it in the same directory as your xls
and have code in the xls that copies it to the correct directory and runs
the shell command.

--
Regards,
Tom Ogilvy

"Alan" wrote in message
...
"Tom Ogilvy" wrote in message
...

That wouldn't work anyway, so no need to struggle with it.


Hi Tom,

Thanks for your reply.

Does that mean it is impossible to do it purely through the
distribution of the xls file?

Do I have to find some other way to get the file onto their hard disk?
I'm not really familiar with this, so I am not quite sure what you
mean by:


If you want to install the control on a users computer, you will

need
to have the files that define the control and install them.


As far as I know, there is only one file (mscal.ocx). To do it
manually, I just drop that file into the correct folder on their PC,
and then register it using VBA:

Shell ("regsvr32.exe mscal.ocx")

Therefore, I think it is only this part that is stopping me:


you will need to have the files that define the control


But I definately have the file - it is just how to actually distribute
it that I cannot figure out.


Apologies if I am missing the point - I haven't tried this before.

Thanks for your assistance,

Alan.