The information in this article applies to:
SYMPTOMSThe ToolsCalculate WordBasic command gives a WordBasic error 24 "bad parameter" if the function form is used with both a cell reference and a table bookmark. The example on page 747 of the "Microsoft Word Developer's Kit" is not correct. CAUSEThe ToolsCalculate function in Microsoft WordBasic takes the form
where Expression$ takes the form of the =(Formula) field. Expression$ can
have arguments that are numbers, bookmarks, or table cells. Combinations
can also be used as arguments. However, the following example (as shown on
page 747), which specifies the use of specific cell references within two
bookmarked tables, is not a valid expression and gives a WordBasic error 24
"bad parameter":
This construction behaves correctly for formula fields. The following field
yields the correct result:
RESOLUTIONYou can simulate the functionality of the WordBasic statement above by bookmarking cell a5 of the "Sales" table and cell b5 of the "Other" table and then adding the two bookmarks (see example 3 below). ExamplesThe following are all valid uses of the WordBasic ToolsCalculate command. (Note: In the following examples, "Sales" is a bookmarked table, "Units" is a bookmarked cell whose value is 10, and "Cost" is a bookmarked number elsewhere in the document whose value is 2.5.)
Additional query words: err message Word Basic macro
Keywords : kberrmsg kbmacro wordnt kbmacroexample winword ntword macword word6 word7 word95 |
Last Reviewed: December 28, 1999 © 2000 Microsoft Corporation. All rights reserved. Terms of Use. |