Shortcut key for Block comment in VB

Hi

     Is there any shortcut key for Block Commenting in VB ?

Thanks in advance

Shiju
LVL 14
Shiju SasidharanAssoc Project ManagerAsked:
Who is Participating?
 
Mike TomlinsonConnect With a Mentor Middle School Assistant TeacherCommented:
Here is how an example on MSDN of how to create an Add-In:
http://support.microsoft.com/kb/189468/EN-US/

There is an interesting article here:
http://www.ftponline.com/archives/listissue.asp?pubID=1&MagIssueId=156#
That demonstrates how to subclass the IDE code window so you can create macros.  Haven't tried it out thoug.

Really not finding much documentation out there on how to write Add-Ins.

~IM
0
 
Ryan ChongCommented:
No, you need to put:

' or rem

line by line...
0
 
Mike TomlinsonMiddle School Assistant TeacherCommented:
As a side note, you can do block comments in VB.Net (Ctrl-K,Ctrl-C).

~IM
0
Cloud Class® Course: Microsoft Windows 7 Basic

This introductory course to Windows 7 environment will teach you about working with the Windows operating system. You will learn about basic functions including start menu; the desktop; managing files, folders, and libraries.

 
Harisha M GCommented:
You select the entire block and simply press "Tab"

To uncomment select and press "Shift + Tab"
0
 
Mike TomlinsonMiddle School Assistant TeacherCommented:
That just moves the block in or out (which is convenient) but doesn't change the block to all comments.

>> Is there any shortcut key for Block Commenting in VB ?

~IM
0
 
Harisha M GCommented:
I'm so sorry. I confused it. :(

You can use the Edit toolbar to Comment or Uncomment
0
 
VBtormentCommented:
here is a simple one i use to block code

if 1=0 then 'always false

    Code you want to comment

endif
0
 
SethiCommented:
You can use block comments in VB...right click you VB IDE menu and choose Customize...Go to Commands tab and choose Edit from the left listbox...scroll the right bar down and you will see block comment button...drag that to your VB IDE
0
 
Harisha M GCommented:
Sethi,
   instead of doing all that you can directly use the 'Edit' toolbar provided with VB which I have already told. :)
0
 
Mike TomlinsonMiddle School Assistant TeacherCommented:
But neither comment answers the question:

>> Is there any shortcut key for Block Commenting in VB ?

You still have to click on the button in the toolbar (whereever it is since this customizable).

~IM
0
 
Shiju SasidharanAssoc Project ManagerAuthor Commented:
Yes, idle_mind

i need a Shorcut key for the same

is it possible in VB ?

Thanks
Shiju

0
 
Mike TomlinsonMiddle School Assistant TeacherCommented:
There isn't an accellerator key for the "Comment Block" menu command and I can't find a way to add a shortcut key combo to a toolbar button in the IDE so I dont' think there is a canned way for you to accomplish this.

If you are ambitious, then you could write your own VB6-AddIn by creating a new AddIn project.  AddIns allow you to extend the capabilities of the IDE through VB code.  I have no experience in this arena however, so I can't help you out there.

~IM
0
 
Shiju SasidharanAssoc Project ManagerAuthor Commented:
Hi

Thank u Idle_Mind
i am accepting ur idea.
i understood the fact that VB6 doesnt have a Shorcut key for Block commenting
Thank u all for other comments
;-)
Shiju
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.