I noticed that if an If .. End If statement contains multiple conditions that need to be True for it continue, all conditions seem to be evaluated even if the first one does not return True. An example:
This still bails due to the 2nd part, as there are no rows yet in this DatGridView. Is there a better way to deal with this, other than a nested If statement, because that's just ugly. In some other programming languages, the second part is never evaluated if the first one fails. Is this just one of those little idiosyncrasies of VB?vb Code:
If DataGridView2.Rows.Count > 0 And DataGridView2.Rows(0).Cells("available") IsNot Nothing Then .... End If
Gr,
Mightor




Reply With Quote