I am getting an error: Conversion from string "" to type 'Double' is not valid.
If any of my textboxes are blank even though I have used an if AndAlso statement.
If any of my textboxes are blank even though I have used an if AndAlso statement.
VB.NET:
Private Sub tbWidth_TextChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles tbWidth.TextChanged
Dim wMath = tbWidth.Text / Form1.tslblWidth.Text
Dim hMath = Form1.tslblHeight.Text * wMath
If Form1.tslblWidth.Text IsNot Nothing AndAlso tbWidth.Text IsNot Nothing Then
tbHeight.Text = hMath
End If
End Sub
Last edited: