Results 1 to 8 of 8
  1. #1
    Silver Lounger
    Join Date
    Mar 2001
    Location
    Springfield, Ohio, USA
    Posts
    2,136
    Thanks
    0
    Thanked 1 Time in 1 Post

    Block comment/uncomment (All)

    I get weekly tips from Element K Journals' Inside Visual Basic, http://"]http://www.elementktips.com>http:// http://www.elementktips.com[/url], which is sort of a nuisance, but their latest tip made all the deletes worth while, and I thought I
    <font face="Comic Sans MS">Sam Barrett, CACI </font face=comic>
    <small>And the things that you have heard... commit these to faithful men who will be able to teach others also. 2 Timothy 2:2</small>

  2. #2
    Gold Lounger
    Join Date
    Dec 2000
    Location
    Hollywood (sorta), California, USA
    Posts
    2,759
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Block comment/uncomment (All)

    In VBA (for Word, at least) just turn on the Edit toolbar.
    Kevin <IMG SRC=http://www.wopr.com/w3tuserpics/Kevin_sig.gif alt="Keep the change, ya filthy animal...">
    <img src=/w3timages/blackline.gif width=33% height=2><img src=/w3timages/redline.gif width=33% height=2><img src=/w3timages/blackline.gif width=33% height=2>

  3. #3
    Plutonium Lounger
    Join Date
    Dec 2000
    Location
    Sacramento, California, USA
    Posts
    16,775
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Block comment/uncomment (All)

    It isn't on the edit toolbar by default in some of the Office apps, such as Access. You have to drag the commands onto a toolbar or popup menu.
    Charlotte

  4. #4
    Plutonium Lounger
    Join Date
    Dec 2000
    Location
    Sacramento, California, USA
    Posts
    16,775
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Block comment/uncomment (All)

    I usually prefer to drag them onto the code window shortcut menu so that they come up when I right click the mouse instead of having to go up to the toolbar for them.
    Charlotte

  5. #5
    Super Moderator
    Join Date
    Dec 2000
    Location
    New York, NY
    Posts
    2,970
    Thanks
    3
    Thanked 29 Times in 27 Posts

    Re: Block comment/uncomment (All)

    Thanks for that idea, Charlotte - I use (and customize) the shortcut menus in Word extensively, but never thought about customizing them in the VB Editor.

    The topic of a shortcut to the block comment/uncomment function came up before here; what was being sought was a way to assign this to a key shortcut and as I recall, there wasn't any way to do it. The right-click though is a nice consolation prize.

    Gary

  6. #6
    Silver Lounger
    Join Date
    Mar 2001
    Location
    Springfield, Ohio, USA
    Posts
    2,136
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Block comment/uncomment (All)

    Dragging buttons to the shortcut menu is a wonderful idea, but how do you do that?
    <font face="Comic Sans MS">Sam Barrett, CACI </font face=comic>
    <small>And the things that you have heard... commit these to faithful men who will be able to teach others also. 2 Timothy 2:2</small>

  7. #7
    Plutonium Lounger
    Join Date
    Dec 2000
    Location
    Sacramento, California, USA
    Posts
    16,775
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Adding Block Comments to shortcut menu

    Go into the VBE, right click a toolbar and select customize. When you get the toolbar list, click on shortcut menus to turn that one on. Click the Commands tab, select the Edit category and scroll down the Commands list until you find the comment block and uncomment block commands. Then go back to the shortcut menu, click on the Code Windows menu, select Code Window to expand that one, and just drag each of the commands you want over to the location you select on the menu.
    Charlotte

  8. #8
    Star Lounger
    Join Date
    Feb 2001
    Location
    Vancouver, BC, Br. Columbia, Canada
    Posts
    96
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Adding Block Comments to shortcut menu

    Wow! Thanks Charlotte -- I knew I had seen these icons somewhere and have been casually looking for them in my VBE for months! Thanks, Gwenda <img src=/S/bravo.gif border=0 alt=bravo width=16 height=30>

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •