Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 81
Default Disable Focus on Command Buttons

I have a simple form with two command buttons. The user votes for one
of two options by clicking the appropriate button. Currently, when the
form opens it appears that the first button has focus. I don't want
either button to have focus to avoid "leading" the user to one button
over the other.

How can I disable focus on the form?

Thanks.

- John

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,290
Default Disable Focus on Command Buttons

John,
Add a Frame to the form and make it first in the tab order.
Do not place the buttons on it, but place it between the
two buttons and set its height (or width) to ~1.
--
Jim Cone
San Francisco, USA
http://www.realezsites.com/bus/primitivesoftware


"John Michl"
wrote in message
I have a simple form with two command buttons. The user votes for one
of two options by clicking the appropriate button. Currently, when the
form opens it appears that the first button has focus. I don't want
either button to have focus to avoid "leading" the user to one button
over the other.
How can I disable focus on the form?
Thanks.
- John

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 182
Default Disable Focus on Command Buttons

Hi John,

Set the commandbutton with Tabstop = false
like :

Private Sub UserForm_Initialize()
CommandButton1.TabStop = False
End Sub


--

Regards,

Halim


"John Michl" wrote:

I have a simple form with two command buttons. The user votes for one
of two options by clicking the appropriate button. Currently, when the
form opens it appears that the first button has focus. I don't want
either button to have focus to avoid "leading" the user to one button
over the other.

How can I disable focus on the form?

Thanks.

- John


  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 81
Default Disable Focus on Command Buttons

Jim - Thanks for the advice. Worked like a charm.

www.johnmichl.com


Jim Cone wrote:
John,
Add a Frame to the form and make it first in the tab order.
Do not place the buttons on it, but place it between the
two buttons and set its height (or width) to ~1.
--
Jim Cone
San Francisco, USA
http://www.realezsites.com/bus/primitivesoftware


"John Michl"
wrote in message
I have a simple form with two command buttons. The user votes for one
of two options by clicking the appropriate button. Currently, when the
form opens it appears that the first button has focus. I don't want
either button to have focus to avoid "leading" the user to one button
over the other.
How can I disable focus on the form?
Thanks.
- John


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
Disable cell focus [email protected] Excel Discussion (Misc queries) 1 April 26th 09 12:04 AM
Disable Min Max restore buttons PeteSmith Excel Programming 1 May 11th 04 02:34 PM
Set focus on command button Derek Gadd[_2_] Excel Programming 2 February 11th 04 09:52 AM
Control Buttons vs. Command Buttons Robert Gibson Excel Programming 1 October 13th 03 04:33 PM
Disable Menu and command buttons Tom Ogilvy Excel Programming 0 July 14th 03 01:55 PM


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