Free Lessons
Courses
Seminars
TechHelp
Fast Tips
Templates
Topic Index
Forum
ABCD
 
Home   Courses   TechHelp   Forums   Help   Contact   Merch   Join   Order   Logon  
 
Back to Access Developer Forum    Comments List
Upload Images   @Reply   Bookmark    Link   Email   Next Unseen 
Comment Block
Scott Axton 
        
5 years ago
Hey guys does any one know if there is a key combination to do block comments in VBA?

I have used
/*  
stuff
more stuff
*/

in another language but have not found the equivalent here.

I know there is a button that will do a block comment that just puts an apostrophe on each line.  Even if there was a short cut key to do that it would be helpful.

Thanks!
Adam Schwanz  @Reply  
            
5 years ago
Found this online to make a shortcut for it. Done in the Code screen.

    Right-click on the toolbar and select Customize...
    Select the Commands tab.
    Under Categories click on Edit, then select Comment Block in the Commands listbox.
    Drag the Comment Block entry onto the Menu Bar (yep! the menu bar)
    Note: You should now see a new icon on the menu bar.
    Make sure that the new icon is highlighted (it will have a black square around it) then
    click Modify Selection button on the Customize dialog box.
    An interesting menu will popup.
    Under name, add an ampersand (&) to the beginning of the entry.
    So now instead of "Comment Block" it should read &Comment Block.
    Press Enter to save the change.
    Click on Modify Selection again and select Image and Text.
    Dismiss the Customize dialog box.
    Highlight any block of code and press Alt-C. Voila.
    Do the same thing for the Uncomment Block or
    any other commands that you find yourself using often.

Scott Axton OP  @Reply  
        
5 years ago
Smart alek  -  I swear I did a search and didn't find anything.
Thanks for that.
Adam Schwanz  @Reply  
            
5 years ago
I'm a professional googler ;)
No problem
Alex Hedley  @Reply  
           
5 years ago
I think Rubberduck has this functionality and others
Richard Rost  @Reply  
          
5 years ago
That is pretty cool. You just taught me something! I've never had a need for that, but it's super cool. With your permission I'm gonna steal that and use it for the next Fast Tips video!
Adam Schwanz  @Reply  
            
5 years ago
If you're talking to me, I found that online so permission granted haha.
Richard Rost  @Reply  
          
5 years ago

This thread is now CLOSED. If you wish to comment, start a NEW discussion in Access Developer Forum.
 

Next Unseen

 
New Feature: Comment Live View
 
 

The following is a paid advertisement
Computer Learning Zone is not responsible for any content shown or offers made by these ads.
 

Learn
 
Access - index
Excel - index
Word - index
Windows - index
PowerPoint - index
Photoshop - index
Visual Basic - index
ASP - index
Seminars
More...
Customers
 
Login
My Account
My Courses
Lost Password
Memberships
Student Databases
Change Email
Info
 
Latest News
New Releases
User Forums
Topic Glossary
Tips & Tricks
Search The Site
Code Vault
Collapse Menus
Help
 
Customer Support
Web Site Tour
FAQs
TechHelp
Consulting Services
About
 
Background
Testimonials
Jobs
Affiliate Program
Richard Rost
Free Lessons
Mailing List
PCResale.NET
Order
 
Video Tutorials
Handbooks
Memberships
Learning Connection
Idiot's Guide to Excel
Volume Discounts
Payment Info
Shipping
Terms of Sale
Contact
 
Contact Info
Support Policy
Mailing Address
Phone Number
Fax Number
Course Survey
Email Richard
[email protected]
Blog RSS Feed    YouTube Channel

LinkedIn
Copyright 2026 by Computer Learning Zone, Amicron, and Richard Rost. All Rights Reserved. Current Time: 5/7/2026 5:53:03 PM. PLT: 0s