Please note, this is a STATIC archive of website www.tutorialspoint.com from 11 May 2019, cach3.com does not collect or store any user information, there is no "phishing" involved.
Module DataTypes
Sub Main()
Dim b As Byte
Dim n As Integer
Dim si As Single
Dim d As Double
Dim da As Date
Dim c As Char
Dim s As String
b = 1
n = 1234567
si = 0.12345678901234566
d = 0.12345678901234566
da = Today
c = "U"
s = "Me"
'the oath taking
Console.Write(c & " and " & s & vbcrlf)
Console.WriteLine("declaring on the day of: {0}", da)
Console.WriteLine("We will learn VB.Net seriously")
Console.WriteLine("Lets see what happens to the floating point variables:")
Console.WriteLine("The Single: {1}, The Double: {0}", si, d)
Console.ReadKey()
End Sub
End Module
Module constantsNenum
Enum Num
Gage = 1
Asher = 23
Taylor = 66
Ozzy = 39
Matt = 78
End Enum
Sub Main()
If Gage.Num = 1 then Console.Writeline(Yes this is his correct number)
End Sub
End Module
Public Sub SaveAttachmentsToDisk(MItem As Outlook.MailItem)
Dim oAttachment As Outlook.Attachment
Dim sSaveFolder As String
sSaveFolder = "C:\FolderMill Data\Hot Folders\1\Incoming"
For Each oAttachment In MItem.Attachments
oAttachment.SaveAsFile sSaveFolder & oAttachment.DisplayName
Next
End Sub
Module VBModule
Sub Main()
Dim Age as integer
dim name as string
dim gender as char
dim DoB as Date
dim height as decimal
dim license as boolean
Age = 21
name = "NoodleMan"
gender = "M"
'DoB = 8/4/12
height = 12.4
license = true
Console.writeline("Hello my name is" & name & "I am " & Age & "years old. i am a " & gender & ". I was born on " & DoB & ". i am this tall " & height & ". I " & license & "")
End Sub
End Module
Module VBModule
Sub Main()
Dim age as integer'this is integer whole numbers only
dim name as string'this is a string of characters
dim doB as datetime'this is date time datatype
dim gender as char'this is a character
dim height as integer' this is in metres
dim license as boolean'this is true or false
'Assignment statements
Age = 38
Name ="Chuknorris"
'DoB ="21/01/1980"
Gender ="M"
Height =2
license=True
Console.WriteLine("Hello, world!Mr " & Name)
Console.WriteLine("Your age is "& Age)
Console.WriteLine("Your Gender is "& Gender)
Console.WriteLine("Your height is: "& height)
Console.WriteLine("Do you have a license: "& license)
End Sub
End Module
Module VBModule
Sub Main()
dim Age as integer 'this is a integer whole numbers only'
dim Name as string 'this is a string of characters'
dim Dob as date 'this is date time datatype'
dim Gender AS char 'this is acharacter'
dim height as integer 'this is in metre'
dim license as boolean 'this is true or false'
'assignment statements'
Age =88
Name="ael limassol"
'Date ="21/01/1930"
Gender="m"
Height= 7
lisence=true
Console.WriteLine("Hello, world! mr " & name)
console.writeline ("your age is " & age)
console.writeline("your gender is " & gender)
console.write("your height " & height)
console.writeline("do you have a lisence " & license)
End Sub
End Module
Module VBModule
Sub Main()
dim Age as integer 'this is a integer whole members only'
dim Name as string 'this is a string of characters'
'dim Dob as date 'this is date time datatype'
dim Gender as char
dim Height as integer
dim License as boolean
'Assignment statements'
Age = 38
Name = "ChuckNorris"
'DoB' = "21/01/1980"
Gender = "M"
Height = 2
License = True
Console.WriteLine("Hello, world! Mr" & Name )
Console.WriteLine("Your Age is " & Age )
'Console.WriteLine("Your DOB is " & Date)
Console.WriteLine("Yor Gender is " & Gender)
Console.WriteLine("Your height is: " & Height )
Console.WriteLine(" Do you have a license " & License)
End Sub
End Module