Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 67
Default How to set focus back to sheet after showing a user form

Hi Les,

I have a modeless UserForm which opens on a DoubleClick event -
working fine. How can I do this but have the focus remain with the
ActiveCell? Or, alternatively, have the focus leave the newly
opened UserForm?


Presumably you're cancelling the BeforeDoubleClick? If so, one
solution is to specifically reactivate the Excel window:

Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, Cancel
As Boolean)

UserForm1.Show vbModeless
AppActivate Application.Caption
Cancel = True

End Sub


Regards

Stephen Bullen
Microsoft MVP - Excel
www.BMSLtd.co.uk

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
Write data back from a form to sheet Steen Excel Discussion (Misc queries) 9 October 22nd 08 01:22 PM
Form keep the focus unable to get to the code - HELP! Kaz G New Users to Excel 1 January 23rd 08 06:00 PM
Opens to form then keep focus and unable to get to code - HELP!! Kaz G Excel Discussion (Misc queries) 0 January 23rd 08 01:16 AM
How do I get focus back on an Excel file? Stumpiana Charts and Charting in Excel 1 November 18th 05 01:21 AM
How to set focus back to sheet after showing a user form Les[_4_] Excel Programming 0 July 21st 03 07:58 PM


All times are GMT +1. The time now is 12:44 PM.

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

About Us

"It's about Microsoft Excel"