Modeless User Form and Worksheet Focus

J

JWolf

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?
 
C

Chip Pearson

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 said:
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?
 
J

JWolf

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.
 

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