Always on top and Deactivate event

S

Sjaakve

Hi,

I've created a worksheet that displays a userform. The excel window is
located somewhere of the screen and the userform is displayed in the
top os the screen.

The userform acts as some kind of switchboard allowing users to quikly
select and open various applications.

A code was added to ensure the userform stays on top always. A button
on the userform slides the form halfway of the screen after which te
same button can be clicked to let te form slide back into the screen.

Now this al works perfectly.

But...

I would like the userform to move to the position halfway outside the
screen when I select another window, my browser for instance.

I cannot get excel to notice when i select the other window. I've
tried various combination of application and workbook with the
deactivate and windowdeactivate events.

I think this has something to do with the always on top function.

Is it possible to work around this. For instance by checking the
locations of a mouse-click against the location of the userform.

Any other suggestion are also welcome.

Thanks in advance.

Sjaak
 

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