VBA Excel - Problem with Form Focus on Objects

M

malcolmdotcom

I have a small app that as a part of what it does has a "Preview" dialog that
allows the user to navigate through the worksheets in the workbook and it
will highlight an area of each worksheet to show that a specific range is set.
It all works fine, except for a problem that I believe has to do with focus.
The controls look like this:

|<< << >> >>|

They represent, respectively, First Sheet, Previous Sheet, Next Sheet, and
Last Sheet.

The Problem: The default one with focus when you start the app is "Next" (>>).
If you click it, it navigates to the next worksheet as expected, but there is
a slight pause before focus is returned to the command button ">>" so that if
you click it too soon, it doesn't do anything.

This is more annoying than anything, because the remainder of the app still
works. But if there is trick to more quickly restore the focus or to turn
focus off in this form (allowing only mouse clicks of objects), I'd be game
for that.

Anyone able to help? Thanks, Mac
 
F

fredg

I have a small app that as a part of what it does has a "Preview" dialog that
allows the user to navigate through the worksheets in the workbook and it
will highlight an area of each worksheet to show that a specific range is set.
It all works fine, except for a problem that I believe has to do with focus.
The controls look like this:

|<< << >> >>|

They represent, respectively, First Sheet, Previous Sheet, Next Sheet, and
Last Sheet.

The Problem: The default one with focus when you start the app is "Next" (>>).
If you click it, it navigates to the next worksheet as expected, but there is
a slight pause before focus is returned to the command button ">>" so that if
you click it too soon, it doesn't do anything.

This is more annoying than anything, because the remainder of the app still
works. But if there is trick to more quickly restore the focus or to turn
focus off in this form (allowing only mouse clicks of objects), I'd be game
for that.

Anyone able to help? Thanks, Mac

You have posted this message to the wrong newsgroup.
The access in this groups name refers to Microsoft Access, a database
program.
Please repost to the correct newsgroup for the Excel program you are
using. I would suggest you include your Windows and Office version
number in the message.
 

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