Re: Input Output Function Error
I figured it out. It took me a really long time but here is the solution to my problem.
' Open the Sunday file for output and declare variables.
Dim filereader As System.IO.StreamReader
filereader = My.Computer.FileSystem.OpenTextFileReader("Sundaypm.txt")
Dim stringReader As String
stringReader = filereader.ReadLine()
Dim asuncount As Decimal = stringReader
Dim cpaMaxDecimal As Decimal
Dim countaDecimal As Decimal
countaDecimal = asuncount - cpaTextBox.Text
cpaMaxDecimal = cpaTextBox.Text - asuncount
' Calculate Team A situation.
If cpaTextBox.Text < asuncount Then
messageString = "Team A is understaffed by " & countaDecimal & " player(s)."
.cparesponse = messageString
Else : .cparesponse = ""
End If
If cpaTextBox.Text > asuncount Then
messageString2 = ""
.cparesponse = messageString2
messageString3 = "You have " & cpaMaxDecimal & " player(s) available from Team A."
.cparecommendation = messageString3
Else : .cparecommendation = ""
End If
|