VB/ VBA Setting Default & Cancel Buttons through code
Private Sub Form_Load()
'Sets cmdOK as the button control that is clicked when the user presses the Enter key.
cmdOK.Default = True
'Sets cmdCancel as the button control that is clicked when the user presses the ESC key.
cmdCancel.Cancel = True
End Sub
For doing the same in VB.Net Refer : http://dotnetdud.blogspot.com/2007/06/vbnet-setting-default-cancel-buttons.html
Friday, June 08, 2007
Download Windows Live Toolbar and personalize your Web experience! Add custom buttons to get the information you care about most.
Just what I was looking for with VBA in Access 2007. Thank you!
ReplyDeleteI need the same but working with pages. I mean in a Page_Load event.
ReplyDeleteThanks in advance