switching out of Excel with userform open

G

Guest

I have a userform that remains open as a tool to the user and gives them the
choice of leaving the focus on it or the active workbook. If the form
happens to have the focus when I Alt-Tab to another application (e.g.
Outlook), alt-tabbing back shows me the userform but not Excel, that is, the
userform floats on its own above Outlook and I can't see Excel.

Any ideas how to deal with this? It can be resolved by clicking a couple of
times on the Excel icon in the taskbar but I like Alt-Tab and I know other
people who'll be using this are the same!

I guess an approach would be to find an Excel-loses-focus event and use this
to run AppActivate Application.Caption or some such to move the focus back to
Excel just before switching to the other application but I haven't found this.
 
G

Guest

Thanks for that - interesting code! I seem to get a problem with it that
Excel now completely vanishes off the Alt-Tab list.
 

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