ActiveX "Object required" error

hello

sorry if you have replied to my previous question, i didn't have the chance to read your answer (thread deleted)

I have this error that stop me from using an ActiveX that i have just programmed and checked using the control test container.

"Object Required" (error is fired when i try to attach a variable to my control)

Thanks a lot for your time

Olivier




Answer this question

ActiveX "Object required" error

  • didier_g

    could you elaborate on the solution I am getting this error after migrating my VS Studio 7 project to VS Studio 8. I can no longer create a control wrapper class for my activex control. I am getting this same error message when attempting to use the MFC Class from ActiveX wizard.

    Thanks
    John

  • shp21

    Hi, the problem is that after creating a new MFC application on Visual C++ 2005, on the Edit Control, after clicking 'right mouse button' on the control, then choose 'add variable', when the popup window appeared, it was selected "Block" to ActiveX, so now it is not possible to add variables to objects, and it's not possible to select "OK" instead of "Block" anymore. The message of error that appears is:

    Title bar: Internet Explorer Script Error
    An error has occurred in the script on this page.
    Line: 1586
    Char: 2
    Error: 0
    URL: file:///C:/Program%20Files/Microsoft%20Visual%20Studio%208/VC/VCWizards/CodeWiz/MFC/Variable/HTML/3082/default.htm

    Do you want to continue running scripts on this page Yes No

    When clicking Yes, it goes to the Wizard for adding member variables, but the option Type of variable does not appear well. It is not possible to add variables to controls. What should be done Is it necessary to install again Windows XP, as it was suggested or insinuated on another forum Please help, it is necessary to work on project for university and this problem must be solved right now if possible. By the way, this problems is using Visual C++ 2005. Thank you so much! Please send the solution if you can to jaimemontoya@gmail.com. See you.


  • Nandar

    I' coming back now to try to implement my active X as i'm starting running out of time.

    I've tried to create a class from a file choosing the *.ocx file created by building my active X (no error stated btw)

    and i get the following Error:

    "Failed to return new code element. Possibly syntax Error. New Element name. <AfxDisp.h>"

    Please Help. I am open to any suggestion. I'm happy to not use activeX if i can make the same functionalities working using another way.



  • socklan

    Please provide more details. If this is inside IDE, list steps that you take before getting this error dialog.

    Thanks,
    Nikola



  • wmmihaa

    I had the exact same problem, I found the script error when trying to add a variable for the ActiveX control was due to my active X control being registered on a network drive. I moved the project to my local hard drive, re-compiled it to re-register it to the local drive location. I then went back to where I was trying to add a variable to my ActiveX control in my main project and all worked fine, no more Internet Explorer script errors.


  • jimmimacc

    I that still an issue

    Thanks,
    Ayman Shoukry
    VC++ Team


  • Stortik

    The solution seems to be to remove your old class if any are existant. then create class by clicking right with your mouse on your project folder.

    Select Add Class

    then select MFC Class from ActiveX (assuming that your using MFCs) and click add

    Then select your ocx file after choosing 'file' in the top left corner,

    At Last select what control you want to insert in your project.

    That sorted it for me, good luck

    Olivier



  • PCarrier

    Hi, the problem is that after creating a new MFC application on Visual C++ 2005, on the Edit Control, after clicking 'right mouse button' on the control, then choose 'add variable', when the popup window appeared, it was selected "Block" to ActiveX, so now it is not possible to add variables to objects, and it's not possible to select "OK" instead of "Block" anymore. The message of error that appears is:

    Title bar: Internet Explorer Script Error
    An error has occurred in the script on this page.
    Line: 1586
    Char: 2
    Error: 0
    URL: file:///C:/Program%20Files/Microsoft%20Visual%20Studio%208/VC/VCWizards/CodeWiz/MFC/Variable/HTML/3082/default.htm

    Do you want to continue running scripts on this page Yes No

    When clicking Yes, it goes to the Wizard for adding member variables, but the option Type of variable does not appear well. It is not possible to add variables to controls. What should be done Is it necessary to install again Windows XP, as it was suggested or insinuated on another forum Please help, it is necessary to work on project for university and this problem must be solved right now if possible. By the way, this problems is using Visual C++ 2005. Thank you so much!


  • Salimgbelim

    here is the details of the error printed on the screen


    Line: 1212
    Char: 3
    Error: Object Required
    code:0
    file://C:\Work Tools\Programming Tools\Microsoft Visual Studio\VC\VCWizards\CodeWiz\MFC\Variable\HTML\1033\default.htm



  • Hal Kilmer

    No it isn't i guess it took a certain amount of time before i found out that maybe 'adding a class from activeX' to my project would help.

    but i found it so the problem is solved.

    i guess the solution was to obvious so i didn't see it straight away.

    anyway thanks for your help.



  • Tzu-Yie

    Thanks Tom. My problem was solved by installing again Visual Studio 2005, but your solution is obviously better. So if I have again the same problem, I'll know what to do.

    Jaime Montoya
    jaimemontoya@jaimemontoya.com
    www.jaimemontoya.com


  • Balu Chaturvedula

    Sorry for the lack of precision

    I have created an active X Using a project based on MFC ActiveX Control

    then i have programed the behaviour of it and the drawing and make sure it didn't crash.

    At last i added two functions to Control the active X.

    Then i added my control in a dialog box and i tried to attach a variable to it in order to call the two functions i created earlier.

    in order to do that a clicked the 'right mouse button' on the control then choose 'add variable'.

    when the popup window tried to open it crashes giving me the error previously stated "Object required" .

    I hope you'll be able to help me on that one as i am a bit confused.



  • ActiveX "Object required" error