I'm having a little difficulty getting variable typing straight in my mind, for instance the expression:
varInt = txtEditText.Text .....works fine when txtEditText.Text ="123"
But where txtEditText.Text = Null
varInt = txtEditText.Text ....throws an exception instead of returning zero.
So I have to write:
If txtEditText.Text = Null Then
varInt = 0
Else
varInt = txtEditText.Text
End If
...Surely there is a simpler way of writing this ???
varInt = txtEditText.Text .....works fine when txtEditText.Text ="123"
But where txtEditText.Text = Null
varInt = txtEditText.Text ....throws an exception instead of returning zero.
So I have to write:
If txtEditText.Text = Null Then
varInt = 0
Else
varInt = txtEditText.Text
End If
...Surely there is a simpler way of writing this ???