|
code
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Microsoft code did not work?Hi, guys,
I have the following source code copied from MSDN, (http://support.microsoft.com/default.aspx?scid=kb;EN-US;q299566) where Micrsoft XML 4.0 was referenced: Dim obj As MSXML2.ServerXMLHTTP Set obj = New MSXML2.ServerXMLHTTP obj.open "GET", "http://localhost/testerr.htm" obj.send However, when I run it, I got an error message at the second line, saying: Run tim error 430: Class does not support Automation or does not support expected interface. I really could not understand. Any ideas? Thanks.
Show quote
Hide quote
"Andrew" <And***@discussions.microsoft.com> wrote in message Gotta check the "fine" print.... which says....news:79CFA8A1-CFAC-4C4E-93AA-67BB588E5051@microsoft.com... > Hi, guys, > > I have the following source code copied from MSDN, > (http://support.microsoft.com/default.aspx?scid=kb;EN-US;q299566) where > Micrsoft XML 4.0 was referenced: > > Dim obj As MSXML2.ServerXMLHTTP > Set obj = New MSXML2.ServerXMLHTTP > obj.open "GET", "http://localhost/testerr.htm" > obj.send > > However, when I run it, I got an error message at the second line, saying: > > Run tim error 430: Class does not support Automation or does not support > expected interface. > > I really could not understand. Any ideas? Thanks. 'Use the version dependent PROGID of the ServerXMLHttp 'object if referencing MSXML 4.0. '( MSXML2.ServerXMLHTTP40 ) So.... make this change and it should run.... Dim obj As MSXML2.ServerXMLHTTP40 Set obj = New MSXML2.ServerXMLHTTP40 -- Ken Halter - MS-MVP-VB - Please keep all discussions in the groups.. DLL Hell problems? Try ComGuard - http://www.vbsight.com/ComGuard.htm
Can someone please check my code? No Intellisense for items
About The Hard Disk Serial Number Choosing an Installer VB and Excel Calculate the Number of Subsets Crazy VB Convert Variant String to Double Acces Denied when calling FaxDocument Submit Lock Word window? What considerations must be taken for app to run as a service? |
|||||||||||||||||||||||