PRB: Errors Caused by Setting _GENMENU to an Invalid Value

Last reviewed: October 20, 1995
Article ID: Q138375
The information in this article applies to:
  • Microsoft Visual FoxPro for Windows, version 3.0

SYMPTOMS

When you attempt to generate a menu, under certain circumstances, the Generate option of the Menu menu is disabled, or one of the following errors may occur:

   Function argument value, type, or count is invalid.

   -or-

   Function argument value, type, or count is invalid. Line Number: 2202

CAUSE

One of these problems will occur if the system memory variable _GENMENU is initialized to an invalid value or the Genmenu.prg file is corrupt.

RESOLUTION

You may be able to fix this problem by setting _GENMENU to a valid value using the following syntax in the Command window:

  _GENMENU = SYS(2004) + "GENMENU.PRG"

Or you may be able to fix it by adding this line of code as the first line of Vfpstart.prg, which is located in the main Visual FoxPro directory and is the program that starts by default when you launch Visual FoxPro.

If the Genmenu.prg file is corrupt, you may need to replace it by reinstalling Visual FoxPro or by expanding it from the installation media.

STATUS

This behavior is by design.

MORE INFORMATION

Steps to Reproduce Behavior

Ths following steps cause the Generate option to be disabled.

  1. In the Command window, enter the following line of code:

        _GENMENU = ""
    

  2. Modify a menu.

  3. Click the Menu menu.

  4. Note that the Generate option is disabled.


Additional reference words: 3.00 VFoxWin
KBCategory: kbenv kbprb
KBSubcategory: FxenvGeneral


THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY.

Last reviewed: October 20, 1995
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.