When I click on a Hyperlink how can I get it to run some VB script first?

I know it must have something to do with OnClick, but not sure how to call the function