I have a sub that can do two different tasks based on the value of one
variable. So I'd like to have two different buttons on the same form run
this, but each one setting a flag so that the conditional logic knows which
one to run.
Here is what I have in mind:
If Button_One_Was_ Pressed then
link = PerfArray(iCtr) .strFund_Name & ".Doc"
else
link = PerfArray(iCtr) .strTicker & ".Doc"
end if
FollowHyperlink link
Is there a way that both buttons can point to the same sub or do I have to
have one of them point to its own sub and then call this one?
variable. So I'd like to have two different buttons on the same form run
this, but each one setting a flag so that the conditional logic knows which
one to run.
Here is what I have in mind:
If Button_One_Was_ Pressed then
link = PerfArray(iCtr) .strFund_Name & ".Doc"
else
link = PerfArray(iCtr) .strTicker & ".Doc"
end if
FollowHyperlink link
Is there a way that both buttons can point to the same sub or do I have to
have one of them point to its own sub and then call this one?
Comment