Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 136
Default 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?
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7,247
Default 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?


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 136
Default 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


Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Removing focus from a Modeless Form? Ian Chappel Excel Programming 2 May 1st 04 07:54 PM
Text Box on User Form Set Focus Issue John Flynn Excel Programming 0 September 6th 03 02:41 PM
How to set focus back to sheet after showing a user form Stephen Bullen Excel Programming 0 July 22nd 03 10:34 AM
How to set focus back to sheet after showing a user form Les[_4_] Excel Programming 0 July 21st 03 07:58 PM
Modeless form for user interaction Arne[_2_] Excel Programming 6 July 15th 03 02:22 PM


All times are GMT +1. The time now is 09:35 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"