![]() |
Modeless User Form and Worksheet Focus
I'm using a Worksheet_Activate event to display a modeless user form.
The form shows but the focus remains on it. How do I shift the focus back to the worksheet window and my chosen cell? |
Modeless User Form and Worksheet Focus
Use AppActivate to reactive the Excel application. E.g.,
Private Sub Worksheet_Activate() UserForm1.Show vbModeless AppActivate Application.Caption End Sub -- Cordially, Chip Pearson Microsoft MVP - Excel Pearson Software Consulting, LLC www.cpearson.com "JWolf" wrote in message ... I'm using a Worksheet_Activate event to display a modeless user form. The form shows but the focus remains on it. How do I shift the focus back to the worksheet window and my chosen cell? |
Modeless User Form and Worksheet Focus
Thanks Chip.
BTW, I used your modFormPositioner in this module, thanks for the great app. I couldn't get it to work with zoom over 100 or with freeze panes, it took a while to figure out what was happening and do a workaround. Chip Pearson wrote: Use AppActivate to reactive the Excel application. E.g., Private Sub Worksheet_Activate() UserForm1.Show vbModeless AppActivate Application.Caption End Sub |
All times are GMT +1. The time now is 08:13 AM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com