Microsoft KB Archive/66605

Ampersand Doubled in InputBox$ in Word for Windows PSS ID Number: Q66605 Article last modified on 07-21-1994

1.00 1.10 1.10a 2.00

WINDOWS

= SYMPTOMS =

When you use the WordBASIC function InputBox$ and the default text contains an ampersand (&), the ampersand is doubled in the dialog box.

= STATUS =

The problem is was corrected in Word version 2.0a for Windows. To obtain new or updated Microsoft products, call Microsoft End User Sales at (800) 426-9400. If you are outside the United States, contact the Microsoft subsidiary for your area. To locate your subsidiary, call Microsoft International Customer Service at (206) 936-8661.

= MORE INFORMATION =

The syntax for InputBox$ is as follows:

A$=InputBox$ (Prompt$,[title$ ],[default$])

When “default$” contains an ampersand, the ampersand is doubled in the input box display. For example, the macro below

Sub MAIN X$ = InputBox$(“Edit Ampersand”, “Test”, “Jack & Jill”) End Sub

displays a dialog box similar to the following:

Additional reference words: w4wmacro 2.0 2.00 winword

=
================================================================

Copyright Microsoft Corporation 1994.