On Jun 13, 4:20 pm, "Peter T" <peter_t@discussions> wrote:
> Unlike VB(6), in VBA userforms most controls an 'Accelerator' property.
> Select your button, press F4 and look in properties.
>
> Type simply 'S' without the & in the property. This will allow user to Alt-S
> to your button. Also unlike VB, the accelerator key does not need to exist
> in the caption, though if it does it will be underlined.
>
> Regards,
> Peter T
>
> <itsy...@gmail.com> wrote in message
>
> news:(E-Mail Removed)...
>
>
>
> > when i type "&Submit" in the caption property of the button, it shows
> > the text as it is and does nothing if i press alt+S. If it was VB it
> > would have fired the submit button.
>
> > What exactly do i have to to with the .accelerator property to get
> > this working?
>
> > Yash
>
> > On Jun 13, 3:28 pm, "NickHK" <TungChe...@Invalid.com> wrote:
> > > Maybe you can explain what you mean by "no go" ?
> > > I cannot see what you have done.
>
> > > NickHK
>
> > > <itsy...@gmail.com> wrote in message
>
> > >news:(E-Mail Removed)...
>
> > > > Hi Nick
>
> > > > Tried this.. no go...can you plz explain..
>
> > > > Yash
>
> > > > On Jun 13, 3:17 pm, "NickHK" <TungChe...@Invalid.com> wrote:
> > > > > Yash,
> > > > > Check out the .Accelerator property.
>
> > > > > NickHK
>
> > > > > <itsy...@gmail.com> wrote in message
>
> > > > >news:(E-Mail Removed)...
>
> > > > > > Hi All,
>
> > > > > > I am trying to change the caption of a button in VBA to &Submit.
> If i
> > > > > > did this in VB then i would get an underline below the letter S in
> > > > > > "Submit" which would make it a shortcut. However, in VBA it shows
> > > > > > &Sumit as the caption.
>
> > > > > > Can some one pls guide me on how to do this VBA.
>
> > > > > > Thanks in advance,
> > > > > > Yash- Hide quoted text -
>
> > > > > - Show quoted text -- Hide quoted text -
>
> > > - Show quoted text -- Hide quoted text -
>
> - Show quoted text -
Thanks Peter,
That worked...However, the accelerator is in the caption as well, but
still does not show an underline. The drawback is that users wont
understand that there is a short cut.
Yash
|