View Single Post
Old Jan 26th, 2008, 3:31 PM   #10
kewlgeye
Programmer
 
Join Date: Jan 2008
Posts: 53
Rep Power: 1 kewlgeye is on a distinguished road
Smile 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
kewlgeye is offline   Reply With Quote