0

I am missing VBA on my Office 2016 installation (installed via Office deployment tool). When attempting to open Visual basic for Applications (Alt + F11) nothing happens. The Macros options are greyed out in Excel, in Word, I can get to the dialogue to create Macro, but when I press "Create", there is an error message, saying:

The function you are attempting to run contains macros or content that requires macro language support. When this software was installed, you (or your administrator) chose not to install support for macros or controls.

When I go to Developer tab, the Visual Basic and Macros are both greyed out, along with

I have tried reinstalling the Office, I have tried the "Change" option from Programs and Features, however that one does not offer to install additional features (as it was in Office 2010). The thing is, that I am not asked what I want to install during the installation - I start it and it just runs, no questions asked. I have checked the registry for the DisableVBA entry, but it is not there, so I assume VBA is not disabled this way - it is just not installed somehow.

When I found out about the issue, I expected to spend 2 minutes to find some simple installation file to add VBA - however I spent couple of hours searching online with no joy and no information relevant to my actual problem.

This all is happening on company computer which I manage and have admin rights for. The installation files (deployment tool) are provided by the company. I did not have this issue on other computers I manage (using the very same installation process and files).

Does anybody know how to simply install the VBA, so it could be used on the computer? Or any other suggestions for solutions I missed?

Thanks a lot for any response.

1
  • VBA installation files doesn't exist standalone, you need to start an Office custom installation and look for VBA component. If you can't do that, then it's probably disabled by your company Commented Nov 24, 2020 at 9:03

3 Answers 3

0

Did you check the GPO, especially

User Configuration > Policies > Administrative Templates > Microsoft Office 2016 > Security Settings.

User configuration > Policies > Administrative templates > Microsoft Word 2016 > Word options > Security > Trust Center

that they are not disallowing VBA?

1
  • Thanks for the answer. The computers in our company are not managed via Group Policy - they are all pretty much stand alone. The suggested GPO are not even there, when I check the Policy, so I assume this would not be the issue.
    – David
    Commented Nov 24, 2020 at 9:15
0

Generally, VBA is installed along with office.

It is recommended that you uninstall office completely and reinstall:

https://support.microsoft.com/en-us/office/uninstall-office-from-a-pc-9dd49b83-264a-477a-8fcc-2fdf5dbf61d8?ui=en-us&rs=en-us&ad=us

In addition, please make sure that your installation source is not damaged.

0

There might be a vbaoff setting in the registry.

ODT specifically provides for disabling VBA in its XML config file. Details: https://learn.microsoft.com/en-US/previous-versions/office/troubleshoot/office-developer/turn-off-visual-basic-for-application

Method 3: System Policy System Policy Editor is included with the Microsoft Office Resource Kit (ORK). System Policy Editor can be used to turn off Visual Basic for Applications support for Office programs.

Turning on the Disable VBA for Office applications policy sets the VBAOFF DWORD value to 1 in the following registry subkey:

Office 2016

HKEY_LOCAL_MACHINE\Software\Policies\Microsoft\Office\16.0\Common

Office 2013

HKEY_LOCAL_MACHINE\Software\Policies\Microsoft\Office\15.0\Common

Office 2010

HKEY_LOCAL_MACHINE\Software\Policies\Microsoft\Office\14.0\Common

The 2007 Office system

HKEY_LOCAL_MACHINE\Software\Policies\Microsoft\Office\12.0\Common

Office 2003

HKEY_LOCAL_MACHINE\Software\Policies\Microsoft\Office\11.0\Common

Office XP

HKEY_LOCAL_MACHINE\Software\Policies\Microsoft\Office\10.0\Common

Method 5: Manually add the VBAOff registry subkey The VBAOff registry subkey can be added manually to disable Visual Basic for Applications functionality for all users on a computer after Office is installed. To add the VBAOff registry key, follow these steps:

Exit your version of all Office programs.

Click Start, click Run, type regedit, and then click OK.

Locate and then click to select one of the following registry keys, depending on the version of the product that you are using:

For Office 2016, locate and then click to select HKEY_LOCAL_MACHINE\Software\Microsoft\Office\16.0\Common.

For Office 2013, locate and then click to select HKEY_LOCAL_MACHINE\Software\Microsoft\Office\15.0\Common.

For Office 2010, locate and then click to select HKEY_LOCAL_MACHINE\Software\Microsoft\Office\14.0\Common.

For the 2007 Office system, locate and then click to select HKEY_LOCAL_MACHINE\Software\Microsoft\Office\12.0\Common.

For Office 2003, locate and then click to select HKEY_LOCAL_MACHINE\Software\Microsoft\Office\11.0\Common.

For Office XP, locate and then click to select HKEY_LOCAL_MACHINE\Software\Microsoft\Office\10.0\Common.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .