Registrations are now open. Join us today!
There is still a lot of work to do on the wiki yet! More information about editing can be found here.
Already have an account?

Microsoft KB Archive/102490

From BetaArchive Wiki

Microsoft Knowledge Base

Excel: ENTER.DATA() Command Causes Macro to Fail

Last reviewed: September 12, 1996
Article ID: Q102490

The information in this article applies to:

  • Microsoft Excel for Windows, versions 4.0, 4.0a
  • Microsoft Excel for the Macintosh, version 4.0

The ENTER.DATA() macro function turns on Data Entry mode and allows you to enter data in a specified unprotected range on a protected worksheet. Page 132 of the "Function Reference" version 4.0, gives the following example for turning on Data Entry mode:

   =ENTER.DATA(TRUE)
   =RETURN()

The documentation does not mention that a cell or a range of cells must be selected before you run a macro that contains ENTER.DATA(); if no cell or range of cells is selected, the macro will fail. The active cell will not move and no error message will be displayed.

To halt the macro, press ESC.

NOTE: The manual does state that data will be entered in the current selection, but it does not mention that you must select the area first.

To successfully run a macro that contains the ENTER.DATA function:

  • Manually select the unprotected cells and run the macro. -or-
  • Give the unprotected cells a defined name and use the SELECT() function to select them at the beginning of the macro, as in the following sample macro:

          =SELECT(WORKSHEET.XLS!UNPROTECT)
          =ENTER.DATA(TRUE)
          =RETURN()

REFERENCES

"Function Reference," version 4.0, pages 132-33


KBCategory: kbdocerr

KBSubcategory:

Additional reference words: 4.00 4.00a command



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: September 12, 1996
©1997 Microsoft Corporation. All rights reserved. Legal Notices.