![]() |
|
|
|
Thread Tools | Display Modes |
|
|
|
|
#1 |
|
Programmer
Join Date: Jan 2008
Posts: 54
Rep Power: 1
![]() |
I am receiving an error. Conversion from string "" to type 'Double' is not valid.
I will show you the code. It seems to be coming from the variable that I was trying to create so that I could store the information from the sundaypm.txt file. And I wanted to compare it to that number that was stored in the file which is "15" and then to place the difference of that number and a number entered into the textbox in this particular form into another form called sundayResultsForm. Here is the code. Please help with this. Public Class userForm Friend cparecommendation Friend cpaadminsundaycount Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click Dim messageString Dim usersundayString As String = usersundaycpaTextBox.Text Dim cpaMaxDecimal As Decimal = usersundayString - cpaadminsundaycount If usersundaycpaTextBox.Text > cpaadminsundaycount Then messageString = "You have " & cpaMaxDecimal & " player(s) available for hire." cparecommendation = messageString End If ' Open the file for output. Dim fileReader As String FileOpen(1, "Sundaypm.txt", OpenMode.Input) fileReader = My.Computer.FileSystem.ReadAllText("Sundaypm.txt") MsgBox(fileReader) cpaadminsundaycount = MsgBox(fileReader) sundayResultsForm.ShowDialog() FileClose(1) End Sub End Class |
|
|
|
| Bookmarks |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| C# corruption!!! | Kilo | C++ | 32 | May 21st, 2006 8:44 PM |
| Masm | rsnd | Assembly | 4 | May 20th, 2006 9:05 PM |
| Strange behavior: getting different results from the same input on a function. WTH? | pulpfiction | C | 1 | Mar 28th, 2006 11:43 PM |
| libraries | matko | C | 1 | Jan 22nd, 2006 2:12 PM |
| array function, error in arrays. | cloud- | C# | 2 | Nov 26th, 2005 11:23 AM |