I don't have any VB programming knowledge at all, here's some similar php code, should give you an idea if we're thinking of the same.
I probably got it wrong, but you could do something similar.
PHP Code:
<?php
/*
* $Means variable, FYI.
*/
function data($args) {
//Your data function, don't know if it's a VB default.
}
function DataIncrease($args) {
$value = $args++; //Increase by one
return data($value);
}
$textboxes = array('1', '2', '3', '4', '5'); //An array with all textboxes in.
foreach ($textboxes as $id) {
$num = "TextBox" . $id . ".Text"; //i.e TextBox1.Text
$increased = $id++;
if($num <= data($id)) /* You obviously use you own num method. */ {
DataIncrease($increased);
}
}
?>
If you want an infinite number of form you can use the for.