Good afternoon,
Please be gentle, i'm only a begineer at coding!
I have the following sub routine which extracts information from a datagrid. It's only 2 columns so quite simple.
The variable which is passed to the sub "SaveREGtxt(reg)" needs to be available outside of the below sub routine and into a "Button click sub routine."
How can i achieve this please?
Thanks
Simon
Please be gentle, i'm only a begineer at coding!
I have the following sub routine which extracts information from a datagrid. It's only 2 columns so quite simple.
The variable which is passed to the sub "SaveREGtxt(reg)" needs to be available outside of the below sub routine and into a "Button click sub routine."
VB.NET:
Public Sub GetCurrent()
Dim pos As Integer = BS.Position
Dim tz As String = dt(pos)(0)
Dim reg As String = dt(pos)(1)
SaveTZtxt(tz)
SaveREGtxt(reg)
End Sub
Public Sub SaveREGtxt(s As String)
Using sr As New IO.StreamWriter(OutputRegionFile, False)
Dim regionarea As String = s
sr.WriteLine(s)
End Using
End Sub
Public Sub btnSave_Click(sender As Object, e As EventArgs) Handles btnSave.Click
How can i achieve this please?
Thanks
Simon
Last edited by a moderator: