Here is a screen shot of the error and the GUI of each form -
The Error
https://gyazo.com/4b...0ee9e0fc28cf422
Form 1, The Currency Exchanging Form
https://gyazo.com/94...58c03192dc6da4e
Password, The Password Form
https://gyazo.com/ce...f5a3b1b107db9ba
Form 2, The Exchange Rate Editor Form
https://gyazo.com/a6...b5473a5dbd8c10d
Also, here is the code for Form 2.
Private Sub btnUpdate_Click(sender As Object, e As EventArgs) Handles btnUpdate.Click
' These six If statements are to move the value of the text boxs on form 2 into the global variables found in the Global Variable Rates class. The If statements are used to say that if any of the text boxes are blank, then the values within the global variables stay the same
If txtGBPtoUSD.Text = "" Then
Global_Variable_Rates.GBPtoUSD = Global_Variable_Rates.GBPtoUSD
Else
Global_Variable_Rates.GBPtoUSD = txtGBPtoUSD.Text
End If
If txtGBPtoEUR.Text = "" Then
Global_Variable_Rates.GBPtoEUR = Global_Variable_Rates.GBPtoEUR
Else
Global_Variable_Rates.GBPtoEUR = txtGBPtoEUR.Text
End If
If txtUSDtoGBP.Text = "" Then
Global_Variable_Rates.USDtoGBP = Global_Variable_Rates.USDtoGBP
Else
Global_Variable_Rates.USDtoGBP = txtUSDtoGBP.Text
End If
If Global_Variable_Rates.USDtoEUR = "" Then
Global_Variable_Rates.USDtoEUR = Global_Variable_Rates.USDtoEUR
Else
Global_Variable_Rates.USDtoEUR = txtUSDtoEUR.Text
End If
If Global_Variable_Rates.EURtoGBP = "" Then
Global_Variable_Rates.EURtoGBP = Global_Variable_Rates.EURtoGBP
Else
Global_Variable_Rates.EURtoGBP = txtEURtoGBP.Text
End If
If Global_Variable_Rates.EURtoUSD = "" Then
Global_Variable_Rates.EURtoUSD = Global_Variable_Rates.EURtoUSD
Else
Global_Variable_Rates.EURtoUSD = txtEURtoUSD.Text
End If
End Sub
I used If statements to try and fix the problem of having empty text boxes, but they don't seem to help.
Any help will be extremely appreciated.
Thank you,
- Harvey

New Topic/Question
Reply


MultiQuote


|