CreateObject Fails with Error 429

C

cory.j.layman

I am attempting to run this code in Outlook and get a "Run-Time Error
'429': ActiveX component can't create object"

I am doing this with Outlook and Excel 2007. This is my first attempt
to automate one application from within another. What might cause the
CreateObject call to fail?

Sub OpenExcel()
Dim XL As Excel.Application
Dim SearchStr. FileName as String

'*** Omit Code to find search string in contents of an email

Set XL = CreateObject("Excel.Appliction") '*** This line causes
the 429 error
XL.Visible = True
XL.GetOpenFilename "C:\*" & SearchStr * "*.xls*"
FileName = XL.GetOpenFilename("f:\flexcel_EC_Master\*" & ECN *
"*.xls*")
XL.Workbooks.Open FileName
End Sub
 
K

Ken Slovak - [MVP - Outlook]

Assuming that you do have Excel installed there, are you running any script
stoppers? They typically come with an A-V package such as Norton or McAfee,
although some software firewalls also have script stoppers. Those type of
things can prevent CreateObject from working.
 
C

clayman4761

I have many other VBA programs in Outlook and Excel that run just
fine. This is the first time I have tried to automate one program
from another. The IT group has the A-V program locked up so if that's
what is killing it, there is little I can do to work around it.


Assuming that you do have Excel installed there, are you running any script
stoppers? They typically come with an A-V package such as Norton or McAfee,
although some software firewalls also have script stoppers. Those type of
things can prevent CreateObject from working.

--
Ken Slovak
[MVP - Outlook]http://www.slovaktech.com
Author: Professional Programming Outlook 2007.
Reminder Manager, Extended Reminders, Attachment Options.http://www.slovaktech.com/products.htm




I am attempting to run this code in Outlook and get a "Run-Time Error
'429':  ActiveX component can't create object"
I am doing this with Outlook and Excel 2007.  This is my first attempt
to automate one application from within another.  What might cause the
CreateObject call to fail?
Sub OpenExcel()
  Dim XL As Excel.Application
  Dim SearchStr. FileName as String
  '*** Omit Code to find search string in contents of an email
  Set XL = CreateObject("Excel.Appliction")     '*** This line causes
the 429 error
  XL.Visible = True
  XL.GetOpenFilename "C:\*" & SearchStr * "*.xls*"
  FileName = XL.GetOpenFilename("f:\flexcel_EC_Master\*" & ECN *
"*.xls*")
  XL.Workbooks.Open FileName
End Sub- Hide quoted text -

- Show quoted text -
 
R

Roger

I am attempting to run this code in Outlook and get a "Run-Time Error
'429': ActiveX component can't create object"
Set XL = CreateObject("Excel.Appliction") '*** This line causes
the 429 error

Appliction? Application. But yu've probbly realised that by now.

Roger
 

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