Microsoft KB Archive/45745

{|
 * width="100%"|

WD: &quot;Illegal Function Call&quot; Error When Using a Dialog Box

 * }

Q45745

-

The information in this article applies to:


 * Microsoft Word for Windows, versions 1.0, 1.1, 1.1a, 2.0, 2.0a, 2.0a-CD, 2.0b, 2.0c, 6.0, 6.0a, 6.0c
 * Microsoft Word for Windows, version 7.0
 * Microsoft Word for the Macintosh, versions 6.0, 6.0.1

-

SUMMARY
The following are possible causes of an &quot;Illegal function call&quot; (Err=5) in a macro that includes a dialog box:

 The location or size of the dialog box causes the box or some portion of the box to be off the screen. This can be identified by the error occurring at the &quot;Begin Dialog&quot; statement. The dialog box definition does not include an OK and/or Cancel button. This error can be identified by the error occurring at the &quot;Dialog&quot; statement.  The dialog box is larger than the maximum size of a dialog box. For example: "Begin Dialog UserDialog 5000, 5000" The above coordinates exceed the maximum size.  Specifying more than one OK or Cancel button in a Microsoft WordBasic custom dialog box causes the error message.

Note: You can specify a single OK or Cancel button and rename the buttons. No buttons (OK, cancel, etc.) will cause the &quot;illegal function call&quot; error message. The dialog has to have a way to exit. In Word 7.0, the error can be caused by a corrupt wordwiz.ini file. The

wordwiz.ini is used by the wizards to store information about the wizard options you choose the last time you ran the wizard. Renaming or deleting the wordwiz.ini will restore the default wizard settings.

For more information, query on the following:

"creating and custom and OK and cancel and buttons and word and windows" Additional query words: 1.0 1.1 2.0 1.x winword2 word6 6.0.1 7.0 word95 winword 6.0 macword word7

Keywords : kberrmsg kbmacro wordnt winword ntword macword word6 winword2 word7 word95

Issue type :

Technology :