Error 424 Object required - Programmers Heaven

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

Welcome to the new platform of Programmer's Heaven! We apologize for the inconvenience caused, if you visited us from a broken link of the previous version. The main reason to move to a new platform is to provide more effective and collaborative experience to you all. Please feel free to experience the new platform and use its exciting features. Contact us for any issue that you need to get clarified. We are more than happy to help you.

Error 424 Object required

lionblionb Posts: 1,688Member ✭✭
I built the dll and tryied to use in my another VB project. During the compiliening second VB project got Run-time Error(424)Object required. My question is why? dll is referenced.

this is code

Dim obReport As Object
Set obReport = CreateObject("prReports.clsReport")
obReport.PrintReport

Comments

  • KDivad LeahcimKDivad Leahcim Posts: 3,948Member
    : I built the dll and tryied to use in my another VB project. During the compiliening second VB project got Run-time Error(424)Object required. My question is why? dll is referenced.
    :
    : this is code
    :
    : Dim obReport As Object
    : Set obReport = CreateObject("prReports.clsReport")
    : obReport.PrintReport
    :
    :

    You don't say which line, but I assume it's line 2. That looks alright to me.

    If you have referenced the dll, that code is going to result in needlessly slow execution. That is for dlls that you don't have referenced. Try something like the following, it may even tell you what the problem is:

    Dim obReport As prReports.clsReport
    Set obReport = New prReports.clsReport
    obReport.PrintReport

    Hope this helps!
  • lionblionb Posts: 1,688Member ✭✭
    [b][red]This message was edited by lionb at 2002-9-12 5:37:31[/red][/b][hr]
    : : I built the dll and tryied to use in my another VB project. During the compiliening second VB project got Run-time Error(424)Object required. My question is why? dll is referenced.
    : :
    : : this is code
    : :
    : : Dim obReport As Object
    : : Set obReport = CreateObject("prReports.clsReport")
    : : obReport.PrintReport
    : :
    : :
    :
    : You don't say which line, but I assume it's line 2. That looks alright to me.
    :
    : If you have referenced the dll, that code is going to result in needlessly slow execution. That is for dlls that you don't have referenced. Try something like the following, it may even tell you what the problem is:
    :
    : Dim obReport As prReports.clsReport
    : Set obReport = New prReports.clsReport
    : obReport.PrintReport
    :
    : Hope this helps!
    :
    Actually it's line 3. I tried to use your code ... sorry, it doesn't work. Got another message 'User-defined type not defined'. Do not worry about this, I think there is some problem with dll itself. Thanks for your try.


Sign In or Register to comment.