New problem with ActiveX component

G

Guest

I'm puzzled!

I have done all five things recommended by the Microsoft KB article and I
still have a button on a form (cmdEmail) that brings up the error "ActiveX
component cannot create object".

The code on the button is:

Private Sub cmdCustomerCare_Click()
On Error GoTo Err_cmdCustomerCare_Click

Dim Olk As Object
Set Olk = CreateObject("Outlook.Application")

Dim OlkMsg As Object
Set OlkMsg = Olk.CreateItem(0)

OlkMsg.To = "(e-mail address removed)"
OlkMsg.Subject = "Customer Care Follow Up CRD " & Me![pkCRDNumber]

OlkMsg.Display

Set Olk = Nothing
Set OlkMsg = Nothing

Exit_cmdCustomerCare_Click:
Exit Sub

Err_cmdCustomerCare_Click:
MsgBox Err.Description
Resume Exit_cmdCustomerCare_Click

End Sub

This is part of a front end installed on about 20 computers and only one is
bringing up this message.

I've re registered the DAO library, checked all the references in the Tools
menu, ensured the user has read permission for the windows system32 folder,
changed the extensions of the wizards and reinstalled Access. No luck! Help!
 
S

Stefan Hoffmann

hi,
I have done all five things recommended by the Microsoft KB article and I
still have a button on a form (cmdEmail) that brings up the error "ActiveX
component cannot create object".
Private Sub cmdCustomerCare_Click()
On Error GoTo Err_cmdCustomerCare_Click

Dim Olk As Object
Set Olk = CreateObject("Outlook.Application")
This line should generate your error message.
This is part of a front end installed on about 20 computers and only one is
bringing up this message.
So your code is working under normal circumstances.
I've re registered the DAO library, checked all the references in the Tools
menu, ensured the user has read permission for the windows system32 folder,
changed the extensions of the wizards and reinstalled Access. No luck! Help!
Try to reinstall Outlook.


mfG
--> stefan <--
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top