Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Err: Object variable or With block variable not set

Status
Not open for further replies.

vasah20

Programmer
Feb 16, 2001
559
US
How can I get rid of that error? I know that I have been debugging the COM locally by using start with full compile, but when I try to register the DLL on a different machine, I get that error. Any suggestions?

thx
leo
 
never mind - figured it out. i forgot to register my component through MTS. (eg: objectcontext was the object variable that wasn't set)
 
i'm debugging the same error. i have it registered with MTS and i still get it. this is the code i have in my dll for objcontext...

Implements ObjectControl

Private objContext As ObjectContext

Private Sub ObjectControl_Activate()

' Get a reference to the object's context here,
' so it can be used by any method that may be
' called during this activation of the object.
Set objContext = GetObjectContext()
End Sub

Private Function ObjectControl_CanBePooled() As Boolean
' This object should not be recycled,
' so return false.
ObjectControl_CanBePooled = False
End Function

Private Sub ObjectControl_DeActivate()
' Perform any necessary cleanup here.
Set objContext = Nothing
End Sub



can you see something missing or wrong here?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top