C
CAM
Hello,
I need help I get this error message "ActiveX component can't create
object" I am using MS Access 2002 and my users have Access 2002. I looked
in the Internet and found a possible solution, but it did not worked. I
registered DAO by going to Start, and then click Run and typed the
following:
Regsvr32 "C:\Program Files\Common Files\Microsoft Shared\DAO\DAO360.DLL",
but this doesn't seem to do anything. I have a command button that attached
file(s) to an e-mail with the correct e-mail address, which I send to my
customers. I looked to see if any references are missing, but it all looks
good. Now here is the deal I can use the program in my PC, but if I give
another user access to the program from there PC they get "ActiveX component
can't create object" error message. My program work fine, it just other
users cannot push the command button without getting an error message. I am
at my end. Can someone help me. Below is my code to run the comman button.
I don't want to spin my wheels anymore. I don't know if installing and
reinstalling will help, that seems to waste time. Thank you in advance.
Cheers
Private Sub email_Click()
On Error GoTo Err_eMail_Click
Dim sFile As String
Dim email As String
Dim ref As String
Dim PeriodFrom As String
Dim PeriodEnded As String
Dim Receiver As String
Dim When As String
Dim Who As String
Dim Bywhen As String
Dim Importance As String
Dim Reporter As String
Dim objOutlook As Outlook.Application
Dim objEmail As Outlook.MailItem
email = txteMailRecipient
ref = "eBill from XYZ Company"
PeriodFrom = txtPeriodFrom
PeriodEnded = txtPeriodEnded
Set objOutlook = CreateObject("Outlook.application")
Set objEmail = objOutlook.CreateItem(olMailItem)
With objEmail
..To = email
..Bcc = Bcc
..Subject = ref & " "
..Body = "Attached is your e-Bill for Services from " & txtPeriodFrom & " to
" & txtPeriodEnded & " . If you have any questions regarding your bill,
please call us. Thank you." & vbCr & vbCr & "Sincerely," & vbCr & vbCr & "
Corporate Services" & vbCr & "(888) 888-8888" & vbCr & ""
..Attachments.Add "C:\CurrentBillings\Current\Billing Summary.pdf"
..End If
..Display
End With
Exit_eMail_Click:
Exit Sub
Err_eMail_Click:
MsgBox Err.Description
Resume Exit_eMail_Click
End Sub
I need help I get this error message "ActiveX component can't create
object" I am using MS Access 2002 and my users have Access 2002. I looked
in the Internet and found a possible solution, but it did not worked. I
registered DAO by going to Start, and then click Run and typed the
following:
Regsvr32 "C:\Program Files\Common Files\Microsoft Shared\DAO\DAO360.DLL",
but this doesn't seem to do anything. I have a command button that attached
file(s) to an e-mail with the correct e-mail address, which I send to my
customers. I looked to see if any references are missing, but it all looks
good. Now here is the deal I can use the program in my PC, but if I give
another user access to the program from there PC they get "ActiveX component
can't create object" error message. My program work fine, it just other
users cannot push the command button without getting an error message. I am
at my end. Can someone help me. Below is my code to run the comman button.
I don't want to spin my wheels anymore. I don't know if installing and
reinstalling will help, that seems to waste time. Thank you in advance.
Cheers
Private Sub email_Click()
On Error GoTo Err_eMail_Click
Dim sFile As String
Dim email As String
Dim ref As String
Dim PeriodFrom As String
Dim PeriodEnded As String
Dim Receiver As String
Dim When As String
Dim Who As String
Dim Bywhen As String
Dim Importance As String
Dim Reporter As String
Dim objOutlook As Outlook.Application
Dim objEmail As Outlook.MailItem
email = txteMailRecipient
ref = "eBill from XYZ Company"
PeriodFrom = txtPeriodFrom
PeriodEnded = txtPeriodEnded
Set objOutlook = CreateObject("Outlook.application")
Set objEmail = objOutlook.CreateItem(olMailItem)
With objEmail
..To = email
..Bcc = Bcc
..Subject = ref & " "
..Body = "Attached is your e-Bill for Services from " & txtPeriodFrom & " to
" & txtPeriodEnded & " . If you have any questions regarding your bill,
please call us. Thank you." & vbCr & vbCr & "Sincerely," & vbCr & vbCr & "
Corporate Services" & vbCr & "(888) 888-8888" & vbCr & ""
..Attachments.Add "C:\CurrentBillings\Current\Billing Summary.pdf"
..End If
..Display
End With
Exit_eMail_Click:
Exit Sub
Err_eMail_Click:
MsgBox Err.Description
Resume Exit_eMail_Click
End Sub