After checking control checkbox returning focus to the sheet

D

Don Wiss

After a user has checked a control checkbox, the focus normally remains on
the control. I don't like this. Now to return the focus to the sheet I'm
using:

ActiveWindow.RangeSelection.Select

But this is less than perfect. If the active cell is not in view, the
spreadsheet will jump to put it in view. Is there some other way I can
return the focus to the sheet without this quirk?

Thanks, Don <donwiss at panix.com>.
 
V

Vic Eldridge

The checkboxes from the Forms toolbar don't take focus when clicked.
But if you must use the ActiveX checkbox, try the following.

Private Sub CheckBox1_Click()
SendKeys "{ESC}"
End Sub


Regards,
Vic Eldridge
 
D

Don Wiss

The checkboxes from the Forms toolbar don't take focus when clicked.
But if you must use the ActiveX checkbox,

I know this. I really dislike the ActiveX ones. But the checkbox on the
Forms toolbar, for some reason, won't move and size with cells. In this
application I need them to disappear when the section of rows they are on
is hidden.
SendKeys "{ESC}"

Okay. I'll try this when I get back into the office. Looks like a good
solution.

Don <donwiss at panix.com>.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top