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: 94
Default Text Box Focus

I have a bunch of option buttons and one text box on a form.
I want only the text box to have focus, so each time a user
clicks on an option button, the button is selected and focus
returns to TextBox1. I could go like ...

Private Sub OptionButton{1 of 20 numbers}_Click()
TextBox1.SetFocus
End Sub

But is there a way to make TextBox1 take focus automatically
so there is not so much repetition of 'TextBox1.SetFocus' in
my code? Perhaps there is a way to disable each option button
from ever getting focus when clicked (and still allow it to be
selected)?


 
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
Paste function is disabled when a text box has the focus alanleecohen Excel Discussion (Misc queries) 0 January 25th 07 08:02 PM
focus Capp Excel Discussion (Misc queries) 2 November 18th 05 07:25 PM
Focus David Unger Excel Worksheet Functions 20 March 21st 05 06:43 PM
Text Box Set Focus Issue John Flynn Excel Programming 1 September 6th 03 07:24 PM
Text Box on User Form Set Focus Issue John Flynn Excel Programming 0 September 6th 03 02:41 PM


All times are GMT +1. The time now is 07:04 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"