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

Thread: WScript Help!!!

  1. #1
    Join Date
    Dec 2000
    Location
    Canada
    Posts
    59

    WScript Help!!!

    I have been developing a dll that converts my HTML file to PDF. I got it working but when I move the code to a differnt machine a error comes up saying "ActiveX component can't create object"
    I need help.
    Here is the simple function

    Function Create_PDF(FileName As String) As Boolean
    Dim objScript
    Dim ShellApp
    On Error GoTo ERR_OpenForEdit
    Set objScript = CreateObject("WScript.Shell")
    ShellApp = objScript.Run(FileName, 6, True)
    Create_PDF = True
    EXIT_OpenForEdit:
    Exit Function
    ERR_OpenForEdit:
    MsgBox Err.Description
    GoTo EXIT_OpenForEdit
    End Function

    Thank You All
    Raistlin


  2. #2
    Join Date
    Mar 2001
    Posts
    91

    Re: WScript Help!!!

    The error "Active-x component cannot create object" will raise only when the component which u are trying to instantiate is not properly registered in the system.
    Ensure that dll file is properly registered in ur system before instantiating


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