Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How do you make a block comment? 1

Status
Not open for further replies.

Brawn

Programmer
Jul 5, 2001
73
0
0
CA
Hey,

How do you make a block comment?

Thanks, [smile] Brawn

"My mind is my Shrine,
and my body the Temple around it."

-The difference between genius and stupidity is that genius has its limits-
 
This might seem like a cheeky reply but I don't know
But just in case you don't know there is a toolbutton available in the VB IDE which comments out a whole selection and a corresponding one which removes comments from a selection
They are available on the Edit Toolbar
Mark
 
You can't make a block of comments in VB like you can in C++

The difference in C++ a block comment is:
[tt]
/*This is the start of the block
Second Line
Third Line
And the end of the comments*/
[/tt]
With VB it would have to be.
[tt]
'This is the start of the block
'Second Line
'Third Line
'And the end of the comments
[/tt]
The difference is that in VB each line comment must be preceeded with ' Craig, mailto:sander@cogeco.ca

Remember not to name the Lambs...
It only makes the chops harder to swallow
 
You can make a block of comments by highlighting your code and clicking comment block botton in the Edit menu. You need select this menu in view, and toolbar, you will find the icon after that.

Haijun
 
Longmatch, I didn't know that I can common a block out from VB. I give you a star for helpful tips.

Kendel
 
I can't find a shortcut key,
is there a way to set one. Brawn

"My mind is my Shrine,
and my body the Temple around it."

-The difference between genius and stupidity is that genius has its limits-
 
I can't find the shortcut key either but I can drag the whole Edit and drop it in the Toolbar.
 
if you type &_ at the end of each comment line so it looks something like
'Hello &_
This is a block comment &_
I hope it helps ;)

and at the last one just leave it out.
I hope this helps. Keith
sk_kdhall@hotmail.com
 
Keith,
The & is actually unnecessary. The underscore, which just indicates a line continuation, is sufficient by itself. Example:
Code:
'This is _
a comment.
Of course, this isn't really any easier than a ' every line, but it's good to be accurate.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top