A good programming habit is to add comments. A comment begins with a single quote. The Visual Basic compiler ignores everything after a single quote. Comments are a way for the programmer to leave notes for themselves. It is a good habit to always label Ends with a comment. Double-click on the name of a function. When it is highlighted, press CTRL+C to copy the words to the clipboard. Click the space after End Sub, type the single quote, and then press CTRL+V to paste the name of the function as a comment. Add another comment to tell what the procedure does. Comments are shown in green.

Private Sub Form1_Load(ByVal ...

End Sub 'Form1_Load


INDEX, The Code View, Selecting code from list, Events, Arguments, Concatenation, Sender, Scroll Bars, Decimal Values on Scroll Bar, Picture Boxes: the Seasons, Comments, Printing, Closing
Next lesson: Functions in Visual Basic

Copyright © Zebra0.com
All rights reserved worldwide.

 
 

Comments, Printing, Closing