Wrox Programmer Forums
ASP.NET 1.0 and 1.1 Basics ASP.NET discussion for users new to coding in ASP.NET 1.0 or 1.1. NOT for the older "classic" ASP 3 or the newer ASP.NET 2.0.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 1.0 and 1.1 Basics section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
Old May 11th, 2004, 06:43 AM
Authorized User
Join Date: Feb 2004
Posts: 71
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via Yahoo to mahulda
Default Creating Active X Components

Here a few lines of Code I obtained from this site
<script language='VBScript'>
    Dim Xcl

    Sub StartExcel()
        Xcl = CreateObject("Excel.Application")
        Xcl.Visible = true
        dim newBook = Xcl.Workbooks.Add
     end sub
<body onload="StartExcel()">

When i run this program I get the following error
System.Exception: Cannot create ActiveX component.

Is there anything wrong with the code ?
If not then How do I enable Active X Components in my Internet Explorer

-.. -..
Old May 12th, 2004, 12:51 PM
Registered User
Join Date: May 2004
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts

Here is a small example of how to use ActiveX components in IE.
I hope it can help you with your problem.


<TITLE>ATL 7.0 test page for ActiveX object </TITLE>

'One way of doing it :
<OBJECT ID="<name of your ActiveX object>" CLASSID="CLSID:E158200F-877C-456C-A561-061F38E93A74" VIEWASTEXT></OBJECT>
<script language="VBScript">
    <name of your ActiveX object>.About() ' calling a member function inside your ActiveX

'Another way of doing it :
<script language="jscript">
var ActiveXobjectProgId = "name.name.version";

function ActiveXAbout()
    var result = true;
        var tp = new ActiveXObject("name.name.version");
        ActiveXobjectProgId = "name.name";
        tp = new ActiveXObject(ActiveXobjectProgId );

    return result;



Old January 14th, 2006, 10:00 AM
Friend of Wrox
Join Date: Jun 2003
Posts: 344
Thanks: 0
Thanked 1 Time in 1 Post

This is due to the security model on the client machine, check out the links at http://www.greggriffiths.org/webdev/...onclusion.html for info on resolving this issue.

Similar Threads
Thread Thread Starter Forum Replies Last Post
Developing Components. rupen ASP.NET 1.x and 2.0 Application Design 0 March 23rd, 2008 07:08 AM
Creating Active X DLL CoolEJ VB Databases Basics 7 November 30th, 2007 02:29 PM
Accesing Com+ components from c# txerra C# 1 June 22nd, 2005 06:10 AM
Active Directory - Creating Groups r_ganesh76 ASP.NET 1.0 and 1.1 Professional 1 October 4th, 2004 06:43 AM
Creating Activex DLL components vbmo Classic ASP Components 11 June 30th, 2003 04:37 AM

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.