How does one simulate pressing enter in VBA

F

Fred Thomas

Have a button on a form and would like the "GotFocus"
event do the same as pressing the button.

TIA
 
K

Ken Snell

Run the code attached to the button's OnClick event:

Private Sub ButtonName_GotFocus()
Call ButtonName_Click()
End Sub
 
Top