How do I programmatically fire a button's Click event?

To fire a button's Click event programmatically, call its PerformClick method.

For example, in C#:

btnOK.PerformClick();

And in VB .NET:

btnOK.PerformClick()


© (c) 2026 Oak Leaf Enterprises, Inc., 1996-2026 • Updated: 07/05/04
Comment or report problem with topic