CTRL+C,K

CTRL+C,K

Comment and un-comment lines quickly in VBE

Visual studio has CTRL+K, C and CTRL+k, U (keeping CTRL down, and pressing K then C or K then U) to comment and un-comment line or lines

VBE for VBA does not have that

After getting used to quickly comment these lines in .NET, wanted to have the same in VBE.

The issue is that you do not see those commands in menu, only in toolbar

So we can now here add these commands to menu and assign shortcut to them too

That is what I did and I am using it since then

 

I used &1 since I wanted the shortcut to be ALT+E,1 for commenting, and ALT+E,2 for un-commenting

You can use any key here, just keep in mind to use something not used in the Edit menu (if you dropped it in Edit)

 

Just wanted to share this!!

Steven Haskett

Senior Software Developer at MI7 Inc

8 年

I'll second the amazing part!

Rajan Verma

Director at Oscillate Infotech PVT LTD || Web & Mobile Development/MS Access Database Development/Reporting Services/Empowering Organizations to Stay Competitive

8 年

Nice.

回复
ANmar Amdeen

Rapid Application Developer .... with passion

8 年
回复
ANmar Amdeen

Rapid Application Developer .... with passion

8 年

Thanks Brett, waiting to do another project together

Brett Butler ?

VP, Head of R&D and Gaming Systems - AI, ML, Tech Innovation, SW, HW, Networks, Games, Gaming, Media Systems, Casino Management Systems

8 年

In case anyone is wondering... ANmar is amazing.

回复

要查看或添加评论,请登录

ANmar Amdeen的更多文章

  • Shapes and Macros assigned

    Shapes and Macros assigned

    Here is a code that I needed a lot recently. Loops through all sheets, then through all shapes in each sheet and list…

  • Frequent quick copy or Move

    Frequent quick copy or Move

    To copy quick to a certain location without jumping to copy and paste I usually get files in certain location, and most…

  • Easiest way to unprotect Workbook or Worksheet without password

    Easiest way to unprotect Workbook or Worksheet without password

    Looks like there is a bug in new Excel dealing with old Excel files Tried that several times and it worked every time…

    4 条评论
  • Numbers to Arabic (online free service)

    Numbers to Arabic (online free service)

    This is the online version of SpellNumber that is directed to Arabic speakers As some of you might already know, I did…

  • Want My #LinkedIn #password? Here it is!

    Want My #LinkedIn #password? Here it is!

    f(x) = Secure Strong Password Having same exact password for multiple sites or logins is really something you should…

  • Automatic-run Excel macros

    Automatic-run Excel macros

    Since the start of my life with computers back in 1993 (Yes, I am that old) I always was fascinated by the fact of…

  • Methods to speed up VBA long loops in Excel

    Methods to speed up VBA long loops in Excel

    Edit 2015-03-02: Thank you all for all these comments and appreciate the suggestions, not that I do not appreciate…

    23 条评论

社区洞察

其他会员也浏览了