'This tutorial is the same tutorial as "vb_variable",'but instead of writing your variables here you use a module...PublicClass Form1
Inherits System.Windows.Forms.Form
'declare counter as integerDim counter AsIntegerPrivateSub Form1_Load(ByVal sender As System.Object, _
ByVal e As System.EventArgs) HandlesMyBase.Load
myName = "Mr Cool"
myYear = 2002
myNumber = 8.8
EndSubPrivateSub Button1_Click(ByVal sender As System.Object, _
ByVal e As System.EventArgs) Handles Button1.Click
TextBox1.Text = myName
TextBox2.Text = myYear
TextBox3.Text = myNumber
EndSubEnd Class
PublicModule Module1
Public myName AsStringPublic myYear AsIntegerPublic myNumber AsDouble'When you declare your variables and definitions'in a module, they become public for the entire project..'You may also write your public prosedures or functions in a module.'Modules are useful for larger projects when you'want some of your variables or definitions to be globally accessed.'The Option Explicit call is used for variable name debugginngEnd Module
Visual Basic .Net Source Code
I hope you found this VB .Net tutorial useful!
Don't forget to mention Apron Tutorials in your References!