I'm a beginner so please be nice. I'm making a currency exchange calculator in Visual Basic and I've come across an error that I can't seem to figure out:
- Object reference not set to an instance of an object.
Here's the code below that I'm struggling with:
Dim Currency As Double
Dim TextOther As String = Othertext.Text
Dim TextGBP As String = GBPtext.Text
Private Sub Calculate_Click(sender As Object, e As EventArgs) Handles Calculate.Click
TextOther = Currency * Convert.ToDouble(TextGBP)
TextGBP = Currency * Convert.ToDouble(TextOther)
End Sub
Thank you in advance.