Ron wrote:
<snip>
> when the user hits Prepare, it looks to combo boxes, sees what is
> selected and displays apprpriate labels and text boxes and hides the
> ones not needed
<snip>
> dim var1 as string = cboSelected.text
> dim var2 as string = cboSelectiontwo.text
>
> if var1="All" and Var2="Qty" then
>
> .... show some textboxes hide others etc.
<snip>
> Now I also have a Calculate button and when that is pressed i want to
> take values and calc them.
>
> Can I somehow give every IF Block above a name and then use it there
> for btnCalculate_Click
<snip>
If you need the textboxes that were enabled by the Prepare button, I
guess you can save them in a form level list (say, a List(Of TextBox),
if you're using VB 2005), and the Calculate button would just iterate
by them;
Alternatively you may have a CalculateParams class, for example, which
you'd initialize while still in prepare and use in the Calculate.
HTH.
Regards,
Branco.
|