Re: Error creating an object
I think you want to change your declaration to
private withevents mEvent as new MsgGrabber
then drop the set statement. Then your sendmessage should work OK. Also make sure your COM object is registered of course. To do it the way you have it take a look at GetObject. Sometimes you don't want to use new in your declaration if there's a chance that you won't actually need the object in the life of the app.
Also, place a...
set mEvent = nothing
in your form unload
CodeHacker
Rate me if it helped, Thanks
Re: Error creating an object
You can't use the keyword new in the same line as withevents. Causes a compile error.