I converted a large VB6 ap to VB.NET 2005.
I have found that a Late Binding works in VB6 but not in VB. NET when a Function is used.
Ex.
Select Case Type
case 1
LineObj = Type1
case 2
LineObj = Type2
end Select
The below works without a problem
LineObj.itemref .fullname.setva lue(mItem)
But the below fails after it does it FindMe 438 Member not found. (Exception from HRESULT: 0x80020003 (DISP_E_MEMBERN OTFOUND))
QBSetVal(LineOb j.ItemRef.fulln ame, mItem)
QBSetVal does some checking and eventual does a
pObj.setvalue(m Item)
Public Function QBSetVal(pObj,. ....)
pObj.setvalue(m Item)
And the value IS SET properly but when control to returned back to the caller after the RETURN it gets the MEMBER NOT FOUND.
I do not understand how it can set the variable properly in the object but throw the error just on the return.
Can someone tell me what is occurring?
Please help!!!!
I have found that a Late Binding works in VB6 but not in VB. NET when a Function is used.
Ex.
Select Case Type
case 1
LineObj = Type1
case 2
LineObj = Type2
end Select
The below works without a problem
LineObj.itemref .fullname.setva lue(mItem)
But the below fails after it does it FindMe 438 Member not found. (Exception from HRESULT: 0x80020003 (DISP_E_MEMBERN OTFOUND))
QBSetVal(LineOb j.ItemRef.fulln ame, mItem)
QBSetVal does some checking and eventual does a
pObj.setvalue(m Item)
Public Function QBSetVal(pObj,. ....)
pObj.setvalue(m Item)
And the value IS SET properly but when control to returned back to the caller after the RETURN it gets the MEMBER NOT FOUND.
I do not understand how it can set the variable properly in the object but throw the error just on the return.
Can someone tell me what is occurring?
Please help!!!!
Comment