ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Removing focus from a Modeless Form? (https://www.excelbanter.com/excel-programming/296964-removing-focus-modeless-form.html)

Ian Chappel

Removing focus from a Modeless Form?
 
What's the easisest way to remove focus from a modless form, after clicking
a button on that form? Something like "Me.RemoveFocus".

I would like to do it without using the name (or index) of the workbook
which I wish to activate, i.e.f ocus returns to the last active
workbook/window.



Dave Peterson[_3_]

Removing focus from a Modeless Form?
 
How about:

Private Sub CommandButton1_Click()
AppActivate Application.Caption
End Sub


Ian Chappel wrote:

What's the easisest way to remove focus from a modless form, after clicking
a button on that form? Something like "Me.RemoveFocus".

I would like to do it without using the name (or index) of the workbook
which I wish to activate, i.e.f ocus returns to the last active
workbook/window.


--

Dave Peterson


Ian Chappel

Removing focus from a Modeless Form?
 
Cheers Dave, just what I needed. I wish all problems were as simple!

"Dave Peterson" wrote in message
...
How about:

Private Sub CommandButton1_Click()
AppActivate Application.Caption
End Sub


Ian Chappel wrote:

What's the easisest way to remove focus from a modless form, after

clicking
a button on that form? Something like "Me.RemoveFocus".

I would like to do it without using the name (or index) of the workbook
which I wish to activate, i.e.f ocus returns to the last active
workbook/window.


--

Dave Peterson





All times are GMT +1. The time now is 04:22 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com