M
Mike
I have a if then statement in a form calling a public sub in a module, that
section works fine, but affter doing calculations I want to pass the
variable back the the form. How can I go by doing this.
'This is in the Form:
Private Sub btnsubmit_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles btnsubmit.Click
Dim txtuserid As String
Dim acctstat As String
txtuserid = "testuser"
If chkuseracct.CheckState = CheckState.Checked Then Call
test(txtuserid, acctstat) Else acctstat = "No Account Created"
MsgBox(acctstat)
End Sub
'This is in the Modue:
Public Sub test(ByVal txtuserid As String, ByVal acctstat As String)
acctstat = "Account is created"
End Sub
section works fine, but affter doing calculations I want to pass the
variable back the the form. How can I go by doing this.
'This is in the Form:
Private Sub btnsubmit_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles btnsubmit.Click
Dim txtuserid As String
Dim acctstat As String
txtuserid = "testuser"
If chkuseracct.CheckState = CheckState.Checked Then Call
test(txtuserid, acctstat) Else acctstat = "No Account Created"
MsgBox(acctstat)
End Sub
'This is in the Modue:
Public Sub test(ByVal txtuserid As String, ByVal acctstat As String)
acctstat = "Account is created"
End Sub