I am trying write a vb function to be executed when a submit button is clicked. I need to pass a variable from the form into this function. I can't seem to be able to do this. Can anyone help? The form element and the submit button are contained within a single form.