CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 3 of 3
  1. #1
    Guest

    How Can I use CreateObject Method Html.

    Hi Anyone

    How Can I use CreateObject Method in Html.
    please let me know. Thanks !!

    The following is a peice of code which I downloaded from MSDN Online (Banking Samples).
    But it does'nt create the object of "BankSrv.CAdmin"


    <html>
    <head>
    <title>Banking Navigation Page</title>
    </head>
    <body>
    <script language="VBScript">
    <--
    Dim m_oAdmin
    Dim m_iCurrBank
    Dim m_iCurrAccount

    Dim oBank
    Dim iIndex
    Dim bResult

    on error resume next
    'instantiate data services admin object
    set m_oAdmin = CreateObject("BankSrv.CAdmin")
    If Not m_oAdmin is nothing then
    'initialize data services admin object
    else
    MsgBox("error instantiating BankSrv.CAdmin")
    End If
    -->
    </script>
    </body>
    </html>






  2. #2
    Join Date
    Feb 2000
    Posts
    137

    Re: How Can I use CreateObject Method Html.

    Try:

    set m_oAdmin = Server.CreateObject("BankSrv.CAdmin")

    Hope this helps.

    Spectre



  3. #3
    Join Date
    May 1999
    Posts
    3,332

    Re: How Can I use CreateObject Method Html.

    your code looks OK to me.
    There can be several reasons why you couldn't create an ActiveX object. e.g.:
    - the object isn't registered on your machine
    - you do not have the permission to create AX objects (check IE's security settings).


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured