Search code examples
vbaexcelms-officeoffice365

Office365 Excel access to the Tools -> References menu for RegExp library


This might sound like a simple question but I'm creating a macro in VBA that uses regular expressions. It turns out VBA doesn't inherently support regex and I need to add a reference to 'Microsoft VBScript Regular Expressions 5.5' to gain access to regex functions in Excel.

All my searching online tells me you need to go to Tools -> References menu to add/remove references that can be used in VBA.

The Tools -> References menu in Excel as obtained from Google

For the life of me I can't see where the Tools -> References menu is in my Excel. I've enabled the Developers tab and it's not there.

This is what I see

If it helps, I'm using Excel on Office 365 (which Wikipedia tells me is Office 2016) on a Mac. Please help me find how I can access the References menu in Excel (whether or not it can be accessed via Tools -> Menu or some other way). Thanks.


Solution

  • You need to open the Visual Basic (for applications) Editor, or VBE. On the Developers tab, look for "Visual Basic". It should be the left-most item.

    Or, you can press Alt-F11.

    The VBE is where you'll find the Tools menu, and the References submenu.