+ Reply to Thread
Results 1 to 13 of 13

Class does not support automation

  1. #1
    Forum Expert
    Join Date
    10-09-2012
    Location
    Dallas, Texas
    MS-Off Ver
    MO 2010 & 2013
    Posts
    3,049

    Class does not support automation

    Hey everyone,

    A coworker is having an issue with a complex macro she was instructed to use for the first time and the creator of the macro is no longer with the company.

    The error message is: "Class does not support automation..."

    The debugger is highlighting Set Recordset = New ADODB.Recordset
    MacroError.JPG

  2. #2
    Forum Expert Solus Rankin's Avatar
    Join Date
    05-24-2013
    Location
    Hollywood, CA
    MS-Off Ver
    Win7 Office 2010 VS Express 2012
    Posts
    2,655

    Re: Class does not support automation

    What version of windows is she running?

    She may have to go to tools > references > and check > Microsoft ActiveX Data Objects Recordset 2.8 Library in the visual basic editor. I thought it wasn't necessary for windows 7 however.
    Thanks,
    Solus


    Please remember the following:

    1. Use [code] code tags [/code]. It keeps posts clean, easy-to-read, and maintains VBA formatting.
    Highlight the code in your post and press the # button in the toolbar.
    2. Show appreciation to those who have helped you by clicking below their posts.
    3. If you are happy with a solution to your problem, mark the thread as [SOLVED] using the tools at the top.

    "Slow is smooth, smooth is fast."

  3. #3
    Forum Expert
    Join Date
    10-09-2012
    Location
    Dallas, Texas
    MS-Off Ver
    MO 2010 & 2013
    Posts
    3,049

    Re: Class does not support automation

    Yeah I just walked over there and checked that.
    She is running Windows XP but Microsoft ActiveX Data Objects Recordset 2.8 Library is already checked.

  4. #4
    Forum Expert Solus Rankin's Avatar
    Join Date
    05-24-2013
    Location
    Hollywood, CA
    MS-Off Ver
    Win7 Office 2010 VS Express 2012
    Posts
    2,655

    Re: Class does not support automation

    You may need to download a dll or update. Look here at Microsoft's help site: http://support.microsoft.com/kb/2640696

  5. #5
    Forum Guru Kyle123's Avatar
    Join Date
    03-10-2010
    Location
    Leeds
    MS-Off Ver
    365 Win 11
    Posts
    7,239

    Re: Class does not support automation

    It's the Microsoft Active Data Objects x.x Library I believe, rather than Microsoft ActiveX Data Objects Recordset 2.8 Library

    Though the dodgy use of variable names would be my prime suspect

  6. #6
    Forum Expert
    Join Date
    10-09-2012
    Location
    Dallas, Texas
    MS-Off Ver
    MO 2010 & 2013
    Posts
    3,049

    Re: Class does not support automation

    Both Libraries are checked in the references.

    I know this is the first time she has run the macro, so it could be as simple as the import/export data could be in the wrong format right?

    Is there an easy way to debug this thing? My macro knowledge is very minimal but I am familiar with the step through funcitonality.

  7. #7
    Forum Guru Kyle123's Avatar
    Join Date
    03-10-2010
    Location
    Leeds
    MS-Off Ver
    365 Win 11
    Posts
    7,239

    Re: Class does not support automation

    In reference to my earlier post, the first thing I'd do is change the variable name Recordset to something else, you shouldn't use resevered words, functions, types etc as variable names - it's asking for trouble

  8. #8
    Forum Expert
    Join Date
    10-09-2012
    Location
    Dallas, Texas
    MS-Off Ver
    MO 2010 & 2013
    Posts
    3,049

    Re: Class does not support automation

    Oh and I am looking in to the DLL update, although I do not think the macro was created in a Win7 environment.

  9. #9
    Forum Expert
    Join Date
    10-09-2012
    Location
    Dallas, Texas
    MS-Off Ver
    MO 2010 & 2013
    Posts
    3,049

    Re: Class does not support automation

    Quote Originally Posted by Kyle123 View Post
    In reference to my earlier post, the first thing I'd do is change the variable name Recordset to something else, you shouldn't use resevered words, functions, types etc as variable names - it's asking for trouble
    Do you think that could be the issue if it has worked in the passt with the dodgy naming conventions?

  10. #10
    Forum Expert
    Join Date
    10-09-2012
    Location
    Dallas, Texas
    MS-Off Ver
    MO 2010 & 2013
    Posts
    3,049

    Re: Class does not support automation

    So I ran it on my computer (with win 7) and it ran fine. o_O

  11. #11
    Forum Expert Solus Rankin's Avatar
    Join Date
    05-24-2013
    Location
    Hollywood, CA
    MS-Off Ver
    Win7 Office 2010 VS Express 2012
    Posts
    2,655

    Re: Class does not support automation

    I'm fairly certain you're missing a reference to a DLL on the PCs that aren't running windows 7. I've run into this problem before and it didn't effect me (I was running win 7). I guess I was mistake which reference you need.

    You could try the shotgun approach and just reference all DLLs related to Active X controls.

  12. #12
    Forum Contributor
    Join Date
    07-16-2012
    Location
    Ontario Canada
    MS-Off Ver
    Excel 2010
    Posts
    124

    Re: Class does not support automation

    OP, I have encountered the same problem at my workplace when working with Windows XP/Windows 7 and the Active X references.
    For me, if there is no bug in the code, I have been able to fix the issue just by putting a comment in each of the modules and then saving it on the Windows XP machine.
    I guess if you change the code, even if it is a comment, then save it, it does something haha.
    Hope that fixes your issue.

    Oh and also, make sure that your recordset isnt empty.

    Please Login or Register  to view this content.

  13. #13
    Forum Expert
    Join Date
    10-09-2012
    Location
    Dallas, Texas
    MS-Off Ver
    MO 2010 & 2013
    Posts
    3,049

    Re: Class does not support automation

    Yeah I think it is the DLL issue, and I will see if she has to use it in the future, if so I will look at more DLLs and/or use Jason's approach of changing it slightly.

    Thanks

+ 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. runtime 430 error- Class does not support Automation or does not support...
    By kimcole5 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 06-22-2012, 01:27 PM
  2. Class does not support Automation
    By donyc in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 02-17-2011, 10:29 PM
  3. Excel 2007 -- Object does not support automation
    By rchiu5hk in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 10-09-2009, 02:52 AM
  4. Class does not support automation (err 430) - on copyfromrecordset
    By tjharlan in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 07-20-2007, 03:31 PM
  5. Error 430: Class does not support automation...
    By pagates in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 08-22-2005, 03:05 PM

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