Ureader.com  
Microsoft software help and Community
   home   |   control panel login   |   archive   |  
 
Word
application.errors
conversions
docmanagement
drawing.graphics
formatting.longdocs
international
internet.assistant
mail
mailmerge.fields
menustoolbars
newusers
numbering
oleinterop
pagelayout
printingfonts
setup.networking
spelling.grammar
tables
vba.addins
vba.beginners
vba.customization
vba.general
vba.userforms
web.authoring
word6-7macros
word97vba
  
 
date: Sat, 13 May 2006 18:04:52 +0200,    group: microsoft.public.word.vba.userforms        back       


Shortcut key to textbox and commandbotton   
In forms is it possible to underline a letter in the text of a command 
botton and in the label of a text box.
The command botton is pressed when pressing ALT-<underlined letter> and the 
textbox is focused in the same way.
How do I do in my userform to use the same functionality?

Ebbe
date: Sat, 13 May 2006 18:04:52 +0200   author:   Ebbe

Re: Shortcut key to textbox and commandbotton   
In the Properties pane, when the label or command button is selected,
find the property named Accelerator. Set that property to the letter
you want underlined.

If a letter in the label caption is to be the accelerator for a text
box, then you must make the TabIndex value of the label one less than
the TabIndex value of the text box. The reason is that the focus first
goes to the label (because it has the accelerator), but because a
label can't accept the focus, the focus immediately goes to whatever
control is next in the tab order. You want the text box to be that
next control.

--
Regards,
Jay Freedman
Microsoft Word MVP        FAQ: http://word.mvps.org
Email cannot be acknowledged; please post all follow-ups to the
newsgroup so all may benefit.

On Sat, 13 May 2006 18:04:52 +0200, "Ebbe"
 wrote:

>In forms is it possible to underline a letter in the text of a command 
>botton and in the label of a text box.
>The command botton is pressed when pressing ALT-<underlined letter> and the 
>textbox is focused in the same way.
>How do I do in my userform to use the same functionality?
>
>Ebbe
>
date: Sat, 13 May 2006 13:57:20 -0400   author:   Jay Freedman

Re: Shortcut key to textbox and commandbotton   
"Ebbe"  wrote in message 
news:%230nv5bqdGHA.3556@TK2MSFTNGP02.phx.gbl...
> In forms is it possible to underline a letter in the text of a command 
> botton and in the label of a text box.
> The command botton is pressed when pressing ALT-<underlined letter> and 
> the textbox is focused in the same way.
> How do I do in my userform to use the same functionality?
>
>

Commandbuttons and various other controls have an Accelerator property. Set 
that to the letter you want underlined.


-- 
Regards
Jonathan West - Word MVP
www.intelligentdocuments.co.uk
Please reply to the newsgroup
Keep your VBA code safe, sign the ClassicVB petition www.classicvb.org
date: Sat, 13 May 2006 19:00:41 +0100   author:   Jonathan West

Re: Shortcut key to textbox and commandbotton   
Thank you to both of You :-)
It whas exactly, what I was looking fore.

Ebbe

"Jonathan West"  skrev i en meddelelse 
news:%23OmORrrdGHA.1320@TK2MSFTNGP04.phx.gbl...
>
> "Ebbe"  wrote in message 
> news:%230nv5bqdGHA.3556@TK2MSFTNGP02.phx.gbl...
>> In forms is it possible to underline a letter in the text of a command 
>> botton and in the label of a text box.
>> The command botton is pressed when pressing ALT-<underlined letter> and 
>> the textbox is focused in the same way.
>> How do I do in my userform to use the same functionality?
>>
>>
>
> Commandbuttons and various other controls have an Accelerator property. 
> Set that to the letter you want underlined.
>
>
> -- 
> Regards
> Jonathan West - Word MVP
> www.intelligentdocuments.co.uk
> Please reply to the newsgroup
> Keep your VBA code safe, sign the ClassicVB petition www.classicvb.org
date: Sat, 13 May 2006 21:00:16 +0200   author:   Ebbe

Google
 
Web ureader.com


    COPYRIGHT 2007, YARDI TECHNOLOGY LIMITED, ALL RIGHT RESERVE  |   contact us