View Single Post
  #2  
Old May 16th 06, 02:08 PM posted to microsoft.public.outlook.program_vba
Sue Mosher [MVP-Outlook]
external usenet poster
 
Posts: 11,651
Default Outlook 2003. use of Withevents gives error 430

Does myOlApp return Nothing or an actual Outlook.Application object. Many antivirus programs block CreateObject("Outlook.Application")

--
Sue Mosher, Outlook MVP
Author of Configuring Microsoft Outlook 2003
http://www.turtleflock.com/olconfig/index.htm
and Microsoft Outlook Programming - Jumpstart for
Administrators, Power Users, and Developers
http://www.outlookcode.com/jumpstart.aspx

"Jan Lefere" wrote in message ...
Option Explicit

Public WithEvents myOlApp As Outlook.Application

Private Sub Class_Initialize()
Set myOlApp = CreateObject("Outlook.Application")
End Sub

Private Sub Class_Terminate()

If Not myOlApp Is Nothing Then Set myOlApp = Nothing

End Sub


Why Class_initialize generates an error 430, Class does not support
automation or does not support expected interface ?

--
J.Lefere

Ads