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 bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

vbsendmail help needed

Status
Not open for further replies.

Perilous1

IS-IT--Management
Mar 10, 2005
171
US
I've added the line below into a Module and into General Declarations on the Form. I've changed it from Private to Public and always I get the error: "Only Valid in Object Module". This seems like a straightforward error to resolve, but nothing I try makes a difference.

Private WithEvents poSendMail As vbSendMail.clsSendMail

Any help with this would be greatly appreciated.
 
I think that Private WithEvents poSendMail As vbSendMail.clsSendMail needs to be in a form in order for the WithEvents to work.

I hope this helps.



Ron Repp

If gray hair is a sign of wisdom, then I'm a genius.
 
I tried it in a form and in a module to no effect. Finally, I did some research and found out that I needed to "Reference" the vbsendmail.dll

Still, it refused to accept the line until I removed WithEvents. My App works fine without that so mission accomplished.

Thanks for the reply.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top