Affordable Solutions is an independent consultancy based in Soignies, Belgium, owned and run by Hervé Hanuise, specialising in application development using the Microsoft Office suite.
Hervé has a M.Sc. in Engineering, Economics and Management, providing a unique blend of both business and technical skills.
He is one of a handful of people worldwide to have a good 40 years of expertise with his Excel skills.
Affordable Solutions aims to provide a number of helpful and interesting utilities, examples, tips and techniques to help in your use of Excel and development of Excel solutions.
NAVIGATION MENU
Roam around the VBE ….
You can write code in VBA that reads or modifies other VBA projects, modules, or procedures.
This is called extensibility because extends the editor -- you can use VBA code to create new VBA code.
You can write custom procedures that create, change, or delete VBA modules and code procedures.
The VBE (Visual Basic Editor) is a nice but unknown tool which, when duly tuned, can deliver a lot of information about any VBA program.
In order to use the code on this page in your projects, you must change two settings:
-
First, you need to set an reference to the VBA Extensibility library. The library contains the definitions of the objects that make up the VBProject.
In the VBA editor, go the the Tools menu and choose References.
In that dialog, scroll down to and check the entry for Microsoft Visual Basic For Applications Extensibility 5.3.
If you do not set this reference, you will receive a User-defined type not defined compiler error.
-
Next, you need to enable programmatic access to the VBA Project. In Excel 2003 and earlier, go the Tools menu (in Excel, not in the VBA editor),
choose Macros and then the Security item.
In that dialog, click on the Trusted Publishers tab and check the Trust access to the Visual Basic Project setting.
In Excel 2007, click the Developer item on the main Ribbon and then click the Macro Security item in the Code panel.
In that dialog, choose Macro Settings and check the Trust access to the VBA project object model.
The VBA Project that you are going to change with these procedures must be unlocked. There is no programmatic way to unlock a VBA project (other than using SendKeys).
If the project is locked, you must manually unlock. Otherwise, the procedures will not work.
Note: to use my app, just copy the module "VBE_mod" into your workbook, and you are done !
Click here to download the Excel .xlsm file Roam around the VBE
This work is licensed under a Creative Commons Attribution 4.0 International License.
Contacts
E-mail : affordsol49@gmail.com
Téléphone : 067.340.350
Fax : 067.340.351
Affordable Solutions
Rue du Nouveau Monde, 48
B-7060 - SOIGNIES - Belgique