Word 2000 Forms: Button Caption "&" for underscore

V

VBA Coder

I have a button on a Word Form that has a caption "Close". I would like to
place the "&" character before the letter "C" in my button Caption property,
so that the letter "C" is underlined, which will allow the user to press
Alt-C for a shortcut to clicking the button.

Can someone tell me why this will not work in Word? It works fine if I use
Access to create forms. If I try this in Word, the caption of my button is
"&Close".

Am I missing something?
 
J

Jay Freedman

Leave the Caption as "Close" and type "c" in the Accelerator property. The
ampersand for selecting the accelerator works in menu items and toolbar
buttons, not in command buttons.
 
V

VBA Coder

Worked like a charm. Thank you. Very strange that there is this difference
between VB, VBA for Access and VBA for Word.
 
C

Cindy M -WordMVP-

Hi VBA,
Very strange that there is this difference
between VB, VBA for Access and VBA for Word.
They use different forms packages, is why. Back in the dark
past, VB already existed as a separate thing; Word had
WordBasic and Excel its own macro language; Access was
developed as a totally separate application.

Marketing came along in 1993 or so and said, let's bundle
Access, Excel, Word and Powerpoint as an "Office Suite" in
order to get people to buy all our products, instead of
Lotus 1-2-3, WordPerfect, Harvard Graphics and dBase.

Eventually, the Excel, Word and Powerpoint (in that order)
were trimmed to use VBA. VBA bases on the VB language, but
doesn't use all the functionality of VB. And the forms
package with its ActiveX controls is totally independent of
what VB uses. AccessBasic eventually mutated to VBA, but it
kept its own Forms package, that was developed specifically
for Access-related tasks.

Cindy Meister
INTER-Solutions, Switzerland
http://homepage.swissonline.ch/cindymeister (last update
Sep 30 2003)
http://www.mvps.org/word

This reply is posted in the Newsgroup; please post any
follow question or reply in the newsgroup and not by e-mail
:)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top