Solved

Shortcut key for Block comment in VB

Posted on 2004-10-02
13
1,811 Views
Last Modified: 2012-05-05
Hi

     Is there any shortcut key for Block Commenting in VB ?

Thanks in advance

Shiju
0
Comment
Question by:Shiju Sasidharan
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 5
  • 3
  • 2
  • +3
13 Comments
 
LVL 52

Expert Comment

by:Ryan Chong
ID: 12206397
No, you need to put:

' or rem

line by line...
0
 
LVL 86

Expert Comment

by:Mike Tomlinson
ID: 12207026
As a side note, you can do block comments in VB.Net (Ctrl-K,Ctrl-C).

~IM
0
 
LVL 37

Expert Comment

by:Harisha M G
ID: 12208516
You select the entire block and simply press "Tab"

To uncomment select and press "Shift + Tab"
0
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 86

Expert Comment

by:Mike Tomlinson
ID: 12208806
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
 
LVL 37

Expert Comment

by:Harisha M G
ID: 12208835
I'm so sorry. I confused it. :(

You can use the Edit toolbar to Comment or Uncomment
0
 
LVL 1

Expert Comment

by:VBtorment
ID: 12211039
here is a simple one i use to block code

if 1=0 then 'always false

    Code you want to comment

endif
0
 
LVL 18

Expert Comment

by:Sethi
ID: 12211118
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
 
LVL 37

Expert Comment

by:Harisha M G
ID: 12212906
Sethi,
   instead of doing all that you can directly use the 'Edit' toolbar provided with VB which I have already told. :)
0
 
LVL 86

Expert Comment

by:Mike Tomlinson
ID: 12212993
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
 
LVL 14

Author Comment

by:Shiju Sasidharan
ID: 12310263
Yes, idle_mind

i need a Shorcut key for the same

is it possible in VB ?

Thanks
Shiju

0
 
LVL 86

Expert Comment

by:Mike Tomlinson
ID: 12311786
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
 
LVL 86

Accepted Solution

by:
Mike Tomlinson earned 50 total points
ID: 12312059
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
 
LVL 14

Author Comment

by:Shiju Sasidharan
ID: 12430967
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

Featured Post

[Webinar] Code, Load, and Grow

Managing multiple websites, servers, applications, and security on a daily basis? Join us for a webinar on May 25th to learn how to simplify administration and management of virtual hosts for IT admins, create a secure environment, and deploy code more effectively and frequently.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
How to debug this code 7 65
Best way to parse out a json string in VB6? 10 407
Sending a email via excel using vba 6 119
passing a value with stream reader AFTER a ";" 3 92
Enums (shorthand for ‘enumerations’) are not often used by programmers but they can be quite valuable when they are.  What are they? An Enum is just a type of variable like a string or an Integer, but in this case one that you create that contains…
Background What I'm presenting in this article is the result of 2 conditions in my work area: We have a SQL Server production environment but no development or test environment; andWe have an MS Access front end using tables in SQL Server but we a…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…

710 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question