I have a situation where I'm getting an error when I reference an InterOp dll, however when I call methds on objects in the dll when it is running the VB5 debugger, I do not get the error. Can any one help with this as I'm really stumped ?
The error which I get is "Object variable or With block variable not set"
Example code is :-
Dim objEpisodeBO as clsEpisodeBO objEpisodeBO = new clsEpisodeBO objEpisodeBO.Load(strCurrentEpisodeID) 'this line fails when the COM dll is not running in a VB5 debugger
Note that objEpisodeBO is not Nothing.
Why should running a DLL in the VB5 debugger fix the problem ?
I've fixed this now. The problem was due to initialisation being performed by a class that was declared locally instead of at class level in .NET. When I moved the declaration for within a sub to Class level the problem resolved.
I can't explain why this fixed it, but it did. I don't like "inexplicable" problems like this but am pleased that it works now.
Thanks to any who check this out. Alastair.
Marked as answer byAlastair01Friday, August 22, 2008 9:44 AM
Friday, August 22, 2008 9:43 AM
Microsoft is conducting an online survey to understand your opinion of the Msdn Web site. If you choose to participate, the online survey will be presented to you when you leave the Msdn Web site.