In Clipper, I was able to create a macro:
mfile = "NST" + left(sDate,2) + "-" + right(sDate,2) + ".DBF", which I would then reference in the program with the macro symbol &, such as "Use &mfile".
In VB, I have a series of form controls (option buttons), 4 across, 8 rows deep. The rows of buttons are named optComplete0(x), optComplete1(x), optComplete2(x), and so on. Is there a way to step thru a for...to loop, replacing the 0-8 following the "optComplete" with the for-to variable?? I have tried a number of different ways to do this, but keep getting errors. For example, I would assign to a variable:
For y = 0 to 7
myvar = "optComplete" & y
if myvar(1).value = True then ....
This doesn't work at all. What will??
mfile = "NST" + left(sDate,2) + "-" + right(sDate,2) + ".DBF", which I would then reference in the program with the macro symbol &, such as "Use &mfile".
In VB, I have a series of form controls (option buttons), 4 across, 8 rows deep. The rows of buttons are named optComplete0(x), optComplete1(x), optComplete2(x), and so on. Is there a way to step thru a for...to loop, replacing the 0-8 following the "optComplete" with the for-to variable?? I have tried a number of different ways to do this, but keep getting errors. For example, I would assign to a variable:
For y = 0 to 7
myvar = "optComplete" & y
if myvar(1).value = True then ....
This doesn't work at all. What will??