LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 309
Default Set focus on controls of modeless form

When I initially load my modeless form, the input focus
usually begins on my first textbox control (or any other
control).

However, if you click on the spreadsheet, then click
back to the modeless control, the input focus is lost
(ie. not set on any control). How can I set the
input focus back on Textbox1 if someone clicks on
the spreadsheet and then clicks back to the modeless form???

I already tried the following code, but it doesnt work:

Private Sub UserForm_Activate()
UserForm1.TextBox1.SetFocus
End Sub



 
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
Modeless form keeps taking 'focus' Michelle Excel Programming 5 June 14th 08 07:09 PM
Focus In Modeless Form (spare me the grief) ThinkImInTrouble Excel Programming 2 July 10th 05 06:21 PM
How do I switch focus from a modeless user form back to the excel. Yoam69 Excel Programming 7 December 7th 04 07:26 PM
Modeless User Form and Worksheet Focus JWolf Excel Programming 2 May 26th 04 08:27 PM
Removing focus from a Modeless Form? Ian Chappel Excel Programming 2 May 1st 04 07:54 PM


All times are GMT +1. The time now is 03:53 PM.

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"