IT SOLUTIONS
Your full service technology partner! 
-Collapse +Expand
To/From Code
-Collapse +Expand Cross Ref Guide
-Collapse +Expand Members-Only
Sign in to see member-only pages.
   ► KBTo/From GuidesVB.Net  Print This     

End of Statement (VB.Net and Access VBA Cross Reference Guide)

By Mike Prestwood

VB.Net versus Access VBA: A side by side comparison between VB.Net and Access VBA.

 
Language Basics
 

Language basics is kind of a catch all for absolute beginner stuff. The items (common names) I chose for language basics is a bit random and include items like case sensitivity, commenting, declaring variables, etc.

End of Statement

[Other Languages] 

Languages Focus

In coding languages, common End of statement specifiers include a semicolon and return (others exist too). Also of concern when studying a language is can you put two statements on a single code line and can you break a single statement into two or more code lines.

VB.Net:   Return

A return marks the end of a statement and you cannot combine statements on a single line of code. You can break a single statement into two or more code lines by using a space and underscore " _".

Syntax Example:  
Console.WriteLine("Hello1")
Console.WriteLine("Hello2")
Console.WriteLine("Hello3")

'The following commented code
'on a single line does not work...
'Console.WriteLine("Hello4") Console.WriteLine("Hello5")

'Two or more lines works too with a space+underscore:
Console.WriteLine _
"Hello6";
Access VBA:   Return

A return marks the end of a statement and you cannot combine statements on a single line of code. You can break a single statement into two or more code lines by using a space and underscore " _".

Syntax Example:
MsgBox "Hello1"
MsgBox "Hello2"
MsgBox "Hello3"

'The following commented code on a single line does not work...
'MsgBox "Hello4" MsgBox "Hello5"

'Two or more lines works too with a space+underscore:
MsgBox _
"Hello6";












Sales Website: www.prestwood.com Or visit our legacy sales site: 
legacy.prestwood.com


©1995-2024 Prestwood IT Solutions.   [Security & Privacy]