Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is there a way to comment a part of a line in Excel's VBA like c#

The equivalent in c# would be this :

string s = MyFonction(s /* .Replace("r","t") */ );

I am commenting only a part of the line, this way I can't forget the little add up I made, and I can reactivate it by removing /* and */

I would like to do the same in Excel's VBA :

ActiveCell'.Offset(1, 0)'.CurrentRegion.Select

I don't think there is a way to do this directly. Still, it would be extremely useful to be able to comment parts of the line...

Is there a way to at least simulate it ?

like image 705
Antoine Pelletier Avatar asked Feb 15 '18 16:02

Antoine Pelletier


People also ask

How do you indicate that a line of VBA code is a comment?

2. To let Excel VBA know that you want to insert a comment, precede the text with an apostrophe. Note: Excel VBA colors the line green to indicate that it's a comment. Comments become more useful as program size increases. You can also convert multiple code lines to comments temporarily.


1 Answers

Not in VBA, you have to comment all the line

like image 128
Aaron Pan Vega Avatar answered Oct 05 '22 06:10

Aaron Pan Vega