In the VBA editor, go to View
, Toolbars
, Customise...
or right click on the tool bar and select Customise...
Under the Commands
tab, select the Edit
menu on the left.
Then approximately two thirds of the way down there’s two icons, Comment Block
and Uncomment Block
.
Drag and drop these onto your toolbar and then you have easy access to highlight a block of code, and comment it out and uncomment with the click of a button!
See GauravSingh’s answer if you want to assign keyboard shortcuts.
Related Posts:
- What does <> mean?
- How to find a value in an excel column by vba code Cells.Find
- Check if a string contains another string
- VBScript to open a dialog to select a filepath
- Does VBA have Dictionary Structure?
- “Sub or Function not defined” when trying to run a VBA script in Outlook
- What is the function of FormulaR1C1?
- What exactly is the function of Application.CutCopyMode property in Excel
- VBA Excel – Insert row below with same format including borders and frames
- Deleting a file in VBA
- Excel VBA: Can’t get a match, error “Unable to get the Match property of the WorksheetFunction class”
- Run-time error ‘3061’. Too few parameters. Expected 1. (Access 2007)
- Pass arguments to Constructor in VBA
- How to install Date Picker form control in Excel 2016
- How to install Date Picker form control in Excel 2016
- How to fill color in a cell in VBA?
- Refreshing all the pivot tables in my excel workbook with a macro
- VBA: Run time error ’91’?
- Compare Dates in VBA
- What is the difference between “Form Controls” and “ActiveX Control” in Excel 2010?
- ‘Cannot find DAO350.dll’ file error VB6
- Average in VBA in Excel
- VBA Excel “Compile error: Object Required”
- Choosing paper size (NOT DEFAULT sizes) in excel vba
- “Unable to get the VLookup property of the WorksheetFunction Class” error [duplicate]
- Paste Special error 1004 PasteSpecial method of Range class failed
- VBA: Getting run-time 1004: Method ‘Range’ of object ‘_Worksheet’ failed when using cells
- Cannot run the macro… the macro may not be available in this workbook
- What tools are available for managing/writing to WordPress? [closed]
- comment_post_ID 0 (cannot remove from dashboard)
- How to remove comment spam in WordPress
- get comments and get posts in loop
- Facebook comments box on front page
- How is comment spam received without a comments form?
- Does a reply to a wordpress comment notify the author of the comment?
- Link name in comments to Author page? Comment Author Meta in Comments?
- Linking comments from registered users to their profile pages
- How to enable reply on most-deeply-nested comments?
- Display comments on a comment page without form
- Get Comments: Direct link to specific comment + post title
- Get all commenters on a post
- How can I make Disqus comments not show up on pages?
- What filter/action hook can I use to add a few links to the admin comments page?
- How can I show comments in random order?
- Is there any way to override “break comments into pages” and “close comments for old posts” on certain posts, but not on others?
- migrate comments from old database to new database
- Toggle nested comments
- Is it possible to make wp insert last comment onto another page
- How to allow only Admins or Logged In Users to post links in comments?
- wp_insert_comment error. puzzled by date value
- Private replies for comments
- Custom Post Type loops and Disqus
- edit_comment capability for subscriber
- How to add attributes to the comment form tag?
- Yoast makes comment_reply_link function output plain link to comment instead of reply link
- Display User Role Next To Comment
- Same email for all comments
- Add custom field in comments form
- Ajax comment form submit on frontpage alerts success but no insertion
- Declaring in variables [closed]
- Commenting out unwated CSS/scripts in HTML with PHP
- How do I reply to comments from admin panel on a tablet PC?
- Disable comments for a user? [closed]
- Showing author page if user has no post
- Polls with respective comments?
- Enable nested comments in Theme
- Show comment number per author per day
- Hide comments and posts posted by other user
- get comments by current user inside page template
- Send a mail to specific address in a custom field when a new comment is made on a specific post
- Keep comments but turn off commenting
- Where are comment ratings stored?
- how to SELECT for the current post id?
- Multisite WP-API json v2 : can i fetch all comments on all sites with a single query?
- How to save comment name email url fields?
- How to display the user’s comment status on the front end
- get_comments_number() vs. get_post_field( ‘comment_count’, ID )
- Comments turned off, but ‘Leave a reply’ link still there [duplicate]
- How to output number of comments with link to comments
- How do I make Twenty Ten display comments on the home page?
- How to get post id of last approved comment?
- action wp_set_comment_status never gets fired when i change the comment status [closed]
- Send email on new comment when no admin approval needed?
- Display WordPress comments before the plugins?
- Sort post comments from newest to oldest in pagination
- Merge get_comments & get_posts into a single query
- Using Disqus with headless WordPress setup?
- Attaching author tag to the comment
- AddThis Plugin adding html comments in P tags
- How to show a “Comments Are Closed” message on posts where comments have been closed?
- Comments pagination on author page
- Make custom WordPress comments list
- Stop theme displaying comments
- Custom Nested WordPress Comments with avatar
- How can I have a full comments.php for an easy editing of all its aspects?
- Transfer comments from one domain to another
- WordPress is adding above html
- Display DISQUS on homepage
- Customize the new comment notifications sent to the post author after the comment is approved
- Get approved comments or comments that the author is me