What allows me to move from one function to another???

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

What event or method allows me to program an alternative to go to another
seperate function?

Example:
public sub checkbox_click()
if checkbox.ongotfocus then
goto(is this right?) togglebox_click()
 
Since you are in the click event for "checkbox", you don't need to try to
check whether it has the focus: it's just been clicked so it MUST have the
focus!

If you want the event procedure togglebox_click() to run when checkbox is
clicked, this is all you need:

public sub checkbox_click()

togglebox_click

End Sub
 
I just want to add to what Baz has written. If you do need to call other
functions based on some criteria, then you would do as follows:

public sub CheckBox_Click()

if CheckBox.Checked = true then
Function1()
else
Function2()
end if

end sub

You do not need to use goto. I hope this helped.
 
Yep, well spotted, don't use goto, except as prescribed by Microsoft in an
On Error statement.

Don't use goto.
Don't.
Just DON'T!!!
 
Back
Top