Hi,
I've got a user form that I'm using to search my workbook. I would like to be able to press the enter key on any control on the form and for it to activate the search button.
When the form is initialised, I am setting the focus to a text box on the form and the default button property of the search button is set to true.
However, it isn't always activating the Search button reliably when I press enter. The form is modal but it doesn't seem to get the focus properly as sometimes when I press enter, it activates the active cell in the active worksheet.
This form is based on another form in my workbook which works fine.
I have set an accelarator key of Alt + S for the search button so am using that to activate the search button which works reliably but would like to be able to press the enter key.
Any suggesions will be appreciated,
Thanks,
I've got a user form that I'm using to search my workbook. I would like to be able to press the enter key on any control on the form and for it to activate the search button.
When the form is initialised, I am setting the focus to a text box on the form and the default button property of the search button is set to true.
However, it isn't always activating the Search button reliably when I press enter. The form is modal but it doesn't seem to get the focus properly as sometimes when I press enter, it activates the active cell in the active worksheet.
This form is based on another form in my workbook which works fine.
I have set an accelarator key of Alt + S for the search button so am using that to activate the search button which works reliably but would like to be able to press the enter key.
Any suggesions will be appreciated,
Thanks,