+ Reply to Thread
Results 1 to 5 of 5

CreateObject no longer works

Hybrid View

  1. #1
    Registered User
    Join Date
    11-30-2012
    Location
    Carrollton, TX
    MS-Off Ver
    Excel 2003, 2007, 2010
    Posts
    3

    CreateObject no longer works

    Hi,

    Recently I had VBA code that I had used for years to encounter errors. I narrowed it down to the creation of objects.

    This no longer works and gives a 429 or a 438 error:

    Dim OlApp As Outlook.Application
    Set OlApp = CreateObject("Outlook.Application")

    This works:

    Dim OlApp As Outlook.Application
    Set OlApp = New Outlook.Application

    So New works and CreateObject does not. Other people using this code can still run it using CreateObject.

    We are all using Windows 10 and Office 365

    Thanks,
    tcaylor

  2. #2
    Registered User
    Join Date
    06-04-2019
    Location
    U.S.
    MS-Off Ver
    2016
    Posts
    48

    Re: CreateObject no longer works

    Mr. tcaylor,

    Good morning sir!! This may be a little over my head but I will take a stab at it. You might want to try something more like this:

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

    Not 100% sure if this will solve your problem, but it's worth a shot.

    Dome

  3. #3
    Registered User
    Join Date
    11-30-2012
    Location
    Carrollton, TX
    MS-Off Ver
    Excel 2003, 2007, 2010
    Posts
    3

    Re: CreateObject no longer works

    BD,

    Thank you for your reply. Using the OlApp As Object is what I had originally. I had changed it to OlApp As Outlook.Application trying to get it to work.

    thanks,
    tcaylor

  4. #4
    Registered User
    Join Date
    10-05-2012
    Location
    Gainsborough, England
    MS-Off Ver
    Office 2016 & Office 365
    Posts
    87

    Re: CreateObject no longer works

    Maybe no help but.....
    In certain code I was using CreateObject("Outlook.Application") would also throw up an error due to Outlook not being open and running, once it was open the code ran fine.
    Our code is linked to network computers automatically sending emails through Outlook via excel, so Outlook needed to be running before the code would run.

    Regards
    J

  5. #5
    Registered User
    Join Date
    11-30-2012
    Location
    Carrollton, TX
    MS-Off Ver
    Excel 2003, 2007, 2010
    Posts
    3

    Re: CreateObject no longer works

    J,

    Thanks for your reply. Neither CreateObject or New will work when Outlook is closed but I know that it used to. I know that sounds vague.

    tcaylor

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. VBA Code No Longer Works
    By cindywylie in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 05-18-2015, 02:20 PM
  2. [SOLVED] Macro no longer works
    By rkorinko in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 07-30-2014, 01:40 PM
  3. 'If Left' no longer works
    By Steve Riley in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 10-04-2012, 11:32 AM
  4. 'SendKeys' no longer works
    By aca in forum Excel Programming / VBA / Macros
    Replies: 15
    Last Post: 01-06-2010, 07:05 AM
  5. AgeFunc No Longer Works
    By jhrBanker in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 07-29-2009, 02:57 PM
  6. My formula no longer works?
    By DKerr in forum Excel General
    Replies: 1
    Last Post: 11-03-2006, 06:55 AM
  7. Only CreateObject Syntax works.
    By Boomessh in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 05-07-2005, 09:07 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1