"Herfried K. Wagner [MVP]" <hirf-spam-me-here@gmx.at> wrote in message
news:uIIUaZy7DHA.1936@TK2MSFTNGP12.phx.gbl...
> * "Al@n" <not@thisdomain.co.uk> scripsit:
> > I'm a newcomer to the discipline of programming, having done a little
with
> > VBA, and now trying to learn VB.net and create a stand alone
application.
> > I'm hoping that someone can help with the following issue which I'm sure
is
> > quite a basic one for more experienced developers.
> >
> > I have a panel on which there are several textboxes. These text boxes
are
> > populated and all their contents changed using the click event of a
command
> > button calling the subs below.
> >
> > Sub Stat1()
> >
> > txtDisplayTitle.Text = "OPERATOR SETTINGS"
> >
> > txtData1.Text = "Local Control ON"
> >
> > txtData2.Text = "E/F ON, SEF ON"
> >
> > txtData3.Text = "Auto Reclose ON"
> >
> > txtData5.Text = "Reclose 1"
> >
> > txtData4.Text = "Cold Load IDLE"
> >
> > txtData6.Text = "Prot 'A' Active"
> >
> > End Sub
> >
> > Sub Stat2()
> >
> > txtDisplayTitle.Text = "SWITCGEAR STATUS"
> >
> > txtData1.Text = "Work Tag Off"
> >
> > txtData2.Text = "SF6Normal 35Pag"
> >
> > txtData3.Text = "Aux Supply Normal"
> >
> > txtData4.Text = "Battery Normal"
> >
> > txtData5.Text = " ACR Connected"
> >
> > txtData6.Text = "ACR Data Valid"
> >
> > End Sub
> >
> > Basically, I need to change the value of txtData1 to different text than
> > that above, in other routines in the project. My question is how do I
get
> > the change to be reflected and remembered in Sub Stat1() above for
retention
> > throughout the running of the programme. I think it might be something
to do
> > with defining public string variables and arrays however have been
unable to
> > work this one out.
>
> \\\
> Public Class TheData
> Private Shared m_Data1 As String
>
> Public Shared Property Data1() As String
> Get
> Return m_Data1
> End Get
> Set(ByVal Value As String)
> m_Data1 = Value
> End Set
> End Property
>
> .
> .
> .
> End Class
> ///
>
> Usage:
>
> \\\
> TheData.Data1 = "Foo"
> Me.TextBox1.Text = TheData.Data1
> ///
>
> --
> Herfried K. Wagner [MVP]
> <
http://www.mvps.org/dotnet>