none
Outlook Missing VBA6.DLL RRS feed

  • Question

  • I'm not sure when this happened, but when I attempt to use any code (beyond statements like "Option Explicit") in Outlook 2010 x32 on Windows 7 x64 (office requires us to use 32 bit and 64 bit OS), I get the error message that it can't find the VB6.DLL.  Here's what I know/have done:

    1. verified that VBA works fine outside of outlook - it does, and the VBA reference that is automatically selected is in fact pointing to a VBA6.DLL in the common folder

    2. repaired outlook/office 2010 multiple times with the installation disk

    3. tried to unselect outlook vba's VBA reference, which is NOT pointing to #1 above but instead to some object in syswow64. I'm guessing this is the problem, since I can see two other references to VBA, one of which points to #1. However, it won't let me deslect the bogus one and select the new one saying that it's "In use" (it always says that when I try to deselect the VBA one).

    Thank you in advance for any assistance.

    Friday, March 16, 2012 6:11 PM

Answers

  • Hi Gary,

    Given that you already tried to repair Office* and that this problem does not seem to occur in the other Office applications, it sounds like there is some kind of problem with your Outlook VBA project file. If you haven't already, can you try to exit Outlook and then rename the VBAProject.otm file as per this KB article:

    290779 Description of managing and distributing Outlook 2002 Visual Basic for Applications (VBA) projects
    http://support.microsoft.com/default.aspx?scid=kb;EN-US;290779

    This article is pretty old but still applies in concept. The path for Win7 should be: C:\Users\<user>\AppData\Roaming\Microsoft\Outlook

    Once you restart Outlook, you should have a new VBA project to work with, so please see if this problem goes away. If so, it's likely the best answer will be to transfer your macros into the new project.

    * I generally recommend doing an uninstall/reinstall instead of a repair. While repair may be better in recent years (I can't speak to that), historically the uninstall/reinstall option is the safer route to go.


    Bill Jacob - Microsoft Customer Service & Support - Developer Messaging

    • Marked as answer by Gary Furash Friday, March 23, 2012 4:10 PM
    Friday, March 23, 2012 3:59 PM
    Moderator

All replies

  • I think you should to fix MSOffice from control panel. You can find them in option Modyf.

    Or you must to add in instalaction options VBA Module. If you check before unceck now, reboot, and check again.

    p.s.

    you can try recover file or copy from identical copy of MSOffice and use comment regsrv32.exe

    You can shell commend:

    @%systemroot%\system32\regsvr32 /s VBE6.DLL

    In 2007 You can find vba6.dll byt in 2010 you have vba7.dll - you can use never one.


    Oskar Shon, Office System MVP

    Press if Helpful; Answer when a problem solved


    Sunday, March 18, 2012 7:33 AM
  • Thank you Oskar. Just to make sure I understand what you're suggesting.

    1. Uninstall VBA for Office, reboot, reinstall VBA for Office

    Sounds good. If that's the case, I'll try that.

    2. Add/Register a 2nd version of VB6.dll from the same edition:

    @%systemroot%\system32\regsvr32 /s VBE6.DLL, then add it as a reference

    Well, I have attempted to UNCHECK the Visual Basic for Applications reference now, or add one of the other two on my list (one of which matches a VBE6.DLL, and it won't allow me to do this, giving me a "duplicate reference" and "in use" respectively.


    Gary Furash

    Tuesday, March 20, 2012 3:52 PM
  • No luck so far. I tried both of the above solutions. Again, here's what's odd:

    1. All of the other VBA Enabled MS Office apps from the same install disk reference the correct VBA.DLL

    2. I have no trouble in Outlook VBA Browsing for and adding vba6.dll or vba7.dll, but when I click on it and try to unclick the other "Visual Basic for Applications", it won't let me do the former (too many of the same name) or the latter (it is always "in use" even if I haven't done anything). It p


    Gary Furash

    Thursday, March 22, 2012 10:39 PM
  • Hi Gary,

    Given that you already tried to repair Office* and that this problem does not seem to occur in the other Office applications, it sounds like there is some kind of problem with your Outlook VBA project file. If you haven't already, can you try to exit Outlook and then rename the VBAProject.otm file as per this KB article:

    290779 Description of managing and distributing Outlook 2002 Visual Basic for Applications (VBA) projects
    http://support.microsoft.com/default.aspx?scid=kb;EN-US;290779

    This article is pretty old but still applies in concept. The path for Win7 should be: C:\Users\<user>\AppData\Roaming\Microsoft\Outlook

    Once you restart Outlook, you should have a new VBA project to work with, so please see if this problem goes away. If so, it's likely the best answer will be to transfer your macros into the new project.

    * I generally recommend doing an uninstall/reinstall instead of a repair. While repair may be better in recent years (I can't speak to that), historically the uninstall/reinstall option is the safer route to go.


    Bill Jacob - Microsoft Customer Service & Support - Developer Messaging

    • Marked as answer by Gary Furash Friday, March 23, 2012 4:10 PM
    Friday, March 23, 2012 3:59 PM
    Moderator
  • Great job. Worked perfectly and instantly. When I restarted, it rebuild the OTM file and set the project to point to the correct VBA file.

    Gary Furash

    Friday, March 23, 2012 4:11 PM
  • Sounds great, Gary, glad that worked! Offhand I don't think we've really seen issues like this before, but Outlook VBA isn't commonly used (as it is in other Office applications). So I presume this VBA code project went through some form of "upgrade" process/scenario that got it confused.

    Bill Jacob - Microsoft Customer Service & Support - Developer Messaging

    Friday, March 23, 2012 4:23 PM
    Moderator
  • Thank you. Why would that be? In terms of personal productivity, Outlook VBA is great (e.g., automating your personal workflow, etc.).

    Gary Furash

    Friday, March 23, 2012 4:31 PM
  • Well, I would definitely agree, but the two main reasons are:

    1. We don't support deploying VBA, so it's just not our primary, "real world" development environment for Outlook (add-ins are).

    2. There is no full object model and therefore there is no macro recorder. That makes the learning curve steeper for many.


    Bill Jacob - Microsoft Customer Service & Support - Developer Messaging

    Friday, March 23, 2012 6:12 PM
    Moderator
  • I'd have to agree. Microsoft's model for deploying VBA solutions doesn't seem as easy as it could be. Also, the Macro recorder is incredibly helpful in the other applications, so now it makes more sense to me.

    Gary Furash

    Friday, March 23, 2012 8:18 PM