Highlight vba formula in excel sheet


Hi, welcome back for a new tuto about vba ^^ 

 

This one will be drastically shorter than the one about custom ribbon as it only aims to present to you a quick tip which can come pretty handy when you're working on a project for a end user who doesn't know how to use the vba IDE but still want to know what is happening in the different cells of a table. 

 

Let's take a simple example of a school report model computing the average grade of a student during one semester in math, physics and english.

 

If you use vba to create this model, under the column average grade the end user of your model will not be able to see in details the formula that you're using which can become pretty problematic when you're dealing with much more complex model with massive table and so on.  

 

That's where the following fix can become pretty handy. Indeed, one way to work you're way around this little problem is to use the comment object as follows :

 

As such when the end user will hoover above each cell with a value he will be able to see the details of the formula used in the popping up comment. 

 

And that's it ! So as promise, it was a short one and I will let you build on top of that, by for example, including this little code snippet in a control of a custom ribbon or else. 

 

Have a good day and happy coding  ^^