I have an interface defined in a type library. When I implement this
interface in an ActiveX DLL, I can quite happily carry out the following
casting to make calls to the interfaces methods:

Dim theClass As Project1.Class1
Dim theIface As ITempLib.INewTemporary

Set theClass = New Project1.Class1
Set theIface = theClass
MsgBox theIface.ReturnString

But if I change the ActiveX DLL to an ActiveX Exe, which I need to do to get
around some in-process / out-of-process problems, I get a Type mismatch
error as I try to set theIface.

Can't see any logic to this, or any existing topics on it in MSDN. Any ideas