Help and Support
 

powered byLive Search

PRB: CreateObject Fails from Client-Side Scripts

Retired KB ArticleThis article was written about products for which Microsoft no longer offers support. Therefore, this article is offered "as is" and will no longer be updated.
Article ID:195826
Last Review:May 12, 2003
Revision:2.0
This article was previously published under Q195826

SUMMARY

When you call the CreateObject function from a client-side script, the following error message appears:
ActiveX component can't create object: 'createobject'
This can happen for many reasons. In this case, the script may work locally or when accessed from other computers.

Back to the top

CAUSE

The default security settings for Internet Explorer 5 and Internet Explorer 4.0 Service Pack 1 (version 4.72.3110.8) are slightly different than Microsoft Internet Explorer 4.0 (version 4.72.2106.8). In the original release of Microsoft Internet Explorer 4.0, the security setting Initialize and script ActiveX controls not marked as safe was set to Prompt by default so that users would be prompted whether or not to continue. In Internet Explorer 4.0 Service Pack 1 and later, this option is set to Disable by default.

Back to the top

RESOLUTION

To resolve this problem, follow these steps on the client computer:
1.Start Microsoft Internet Explorer.
2.From the Tools menu in Internet Explorer 5 or the View menu in Internet Explorer 4.0, select Internet Options.
3.Click the Security tab.
4.Select Custom (for expert users), and click Settings.
5.Under the Initialize and script ActiveX controls not marked as safe option, change the setting from Disable to Prompt. This prompts users to initialize the object.
After you change the setting to Prompt, the CreateObject call should succeed. Internet Explorer will prompt the user about whether it should initialize the object. To eliminate the dialog box, you can change the setting in step 5 from Prompt to Enable.

Back to the top

MORE INFORMATION

This error also occurs when the component is not installed correctly. As a result, the component cannot create the object.

Back to the top


APPLIES TO
Microsoft Internet Explorer 4.0 128-Bit Edition
Microsoft Internet Explorer 4.01 Service Pack 2
Microsoft Internet Explorer 4.01 Service Pack 1
Microsoft Internet Explorer 5.0
Microsoft Internet Explorer 5.01
Microsoft Internet Explorer (Programming) 5.01 SP1
Microsoft Internet Explorer 5.5

Back to the top

Keywords: 
kbautomation kbfaq kbprb kbscript KB195826

Back to the top

Article Translations

 

Other Support Options

  • Need More Help?
    Contact a Support professional by Email, Online or Phone.
  • Customer Service
    For non-technical assistance with product purchases, subscriptions, online services, events, training courses, corporate sales, piracy issues, and more.
  • Newsgroups
    Pose a question to other users. Discussion groups and Forums about specific Microsoft products, technologies, and services.