View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
Mary Mary is offline
external usenet poster
 
Posts: 190
Default VBA script ActiveX .ocx embedded

Hi Robin,
Thank you very much for your suggestions.
Unfortunaely it is a must that I use WinSOCK control. That is why I thought
that maybe if I can attach that component to my spreadsheet or include that
component in the zip package, when I either open the spreadsheet or the zip
package it would automatically include this file into the window folder and
then trigger a registration to occur...
So I guess that this method is impossible?
Could you tell me where I can find more information about this Visual Studio
Installer?
Thanks for all your help!
Cheers,
Mary

"Robin Hammond" wrote:

Mary,

I think you will have to work on a more reliable approach. In theory it
would be possible to have the winsock file on a server, use late binding
with an error trap, and if the file doesn't exist download it to the target
then register it with a shell call to regsvr. This is not trivial and is
likely to run into permissioning problems trying to register the ocx file.

I'd have a look at a very simple installation package that will register the
ocx on the target machine as part of your original distribution. Your best
option is probably the Visual Studio Installer. Just add the ocx to the
install package and it should self-register. Again, you will have to ensure
that you have adequate rights to install the ocx, but you can tell the
client that they need to run the installer with admin priviliges.

An alternative thought? Do you have to use a winsock control. Could you
achieve the same thing using IE or an api call like URLDownloadToFile? If so
you might be less likely to have a registration problem.

Robin Hammond
www.enhanceddatasystems.com

"Mary" wrote in message
...
Hi,
I am having a lot of trouble trying to allow my client to open up a
spreadsheet with an embedded winsoc.ocx component within.
Because my client doesn't have the component installed on their PC, I am
trying to come up with a way of embedded the file in the spreadsheet so
that
as soon as the spreadsheet opens, it will allow the file to be moved (or
copied) to the right directory and then register the component
automatically.
Can someone give me some idea as to whether this would be possible.

Thanks heaps!
Regards,
Mary