With this code:

VB Code:
  1. [COLOR=Red]Do Until (CInt(lblDiv1.Text) * 2) > lblDiv2.Text[/COLOR]
  2.             lblDiv1.Text = Math.Round(RandomNo.Next(1, 24) * 2)
  3.             lblDiv2.Text = Math.Round(RandomNo.Next(1, 24) * 2)
  4.         Loop
I get this error:

An unhandled exception of type 'System.InvalidCastException' occurred in microsoft.visualbasic.dll

Additional information: Cast from string "" to type 'Integer' is not valid.


So what is wrong. I don't see a problem there... Does CInt only work when there is an integer already in lblDiv1?