R
Robin Hammond
I've trawled through everything I can find on this and no joy. I think it is
specific to some security change in Excel 2003.
I have a Winsock control - mswinsck.ocx - installed and fully registered on
an XP box running Excel 2003 SP1. A project reference is set to Microsoft
Winsock Control 6 (sp6). This is simply 2 lines of code that run fine on a
different Office XP box:
Dim WS as Winsock
Set WS = New Winsock 'error here
Result: Error 429, ActiveX component can't create object.
There is no compile problem with the code, so it's not a missing reference
per se.
Does anyone have any ideas what is causing this and how I can get it to
work?
Further thoughts:
I started using the winsock control because MS has changed something in a
windows api call: URLDownloadToFile such that it will no longer allow dll,
ocx or exe files to be downloaded. No mention of this change anywhere that I
can find. Funnily enough it is fairly easily circumvented, but I'm sure
there are people wondering what's gone wrong with code that's worked for
years.
Second reason for using the winsock: it allows me to show the actual
progress of a file download and cancel out if things are going wrong. The
api call above is totally synchronous and can cause problems. I have it
working very nicely in XP, and if I can find a solution to this problem will
post it since it's quite useful and I've seen a lot of winsock questions in
the archives.
In the MCP excel managed newsgroup all I get is a total cop out from MS
support referring me back here. I've now tried posting there twice and it
has been no help whatsoever. The minute you mention a problem making code
work they deny responsibility and assume there's an error in the code. All I
can say is that it's pretty hard to find an error in two lines that work on
one box but fail on another.
Robin Hammond
www.enhanceddatasystems.com
specific to some security change in Excel 2003.
I have a Winsock control - mswinsck.ocx - installed and fully registered on
an XP box running Excel 2003 SP1. A project reference is set to Microsoft
Winsock Control 6 (sp6). This is simply 2 lines of code that run fine on a
different Office XP box:
Dim WS as Winsock
Set WS = New Winsock 'error here
Result: Error 429, ActiveX component can't create object.
There is no compile problem with the code, so it's not a missing reference
per se.
Does anyone have any ideas what is causing this and how I can get it to
work?
Further thoughts:
I started using the winsock control because MS has changed something in a
windows api call: URLDownloadToFile such that it will no longer allow dll,
ocx or exe files to be downloaded. No mention of this change anywhere that I
can find. Funnily enough it is fairly easily circumvented, but I'm sure
there are people wondering what's gone wrong with code that's worked for
years.
Second reason for using the winsock: it allows me to show the actual
progress of a file download and cancel out if things are going wrong. The
api call above is totally synchronous and can cause problems. I have it
working very nicely in XP, and if I can find a solution to this problem will
post it since it's quite useful and I've seen a lot of winsock questions in
the archives.
In the MCP excel managed newsgroup all I get is a total cop out from MS
support referring me back here. I've now tried posting there twice and it
has been no help whatsoever. The minute you mention a problem making code
work they deny responsibility and assume there's an error in the code. All I
can say is that it's pretty hard to find an error in two lines that work on
one box but fail on another.
Robin Hammond
www.enhanceddatasystems.com