Comment Block Macros

CodeGuru content and product recommendations are editorially independent. We may make money when you click on links to our partners. Learn More.

Do you find that it is much easier to comment or uncomment a block of
code in Visual Basic editor? I wrote a couple of macro routines to do the same
for Visual C++ editor. When you select a block of code and click on
CommentBlock toolbar button, the selected text will be commented out
with ‘//’. When you click on UncommentBlock toolbar button, the
selected text will be uncommented if it was commented out with ‘//’.

To install the macro file, download it to your Visual Studio macro
directory. This is usually C:Program FilesMicrosoft Visual
StudioCommonMSDev98Macros. From the Visual C++ editor, simply
create two toolbar. Set each of them up to to run these macros:
CommentBlock and UncommentBlock.

Downloads

Download source – 1 Kb

More by Author

Get the Free Newsletter!

Subscribe to Developer Insider for top news, trends & analysis

Must Read