XL7: CopyFromRecordset Doesn't Fail in User-Defined Worksheet

Last reviewed: September 3, 1997
Article ID: Q152207

The information in this article applies to:
  • Microsoft Excel for Windows 95, versions 7.0

SYMPTOMS

The CopyFromRecordset method should fail if you call it in a user-defined worksheet function, but the CopyFromRecordset allows a user-defined worksheet function to place information in a worksheet. This can cause Microsoft Excel to go into an infinite recalculation loop.

RESOLUTION

The CopyFromRecordset method is not supported for use in a user-defined worksheet function, and should not be used.

STATUS

Microsoft has confirmed this to be a problem in the Microsoft products listed at the beginning of this article. We are researching this problem and will post new information here in the Microsoft Knowledge Base as it becomes available.

MORE INFORMATION

A user-defined worksheet function is a Function procedure designed to be called from a formula in a worksheet.

Generally, a user-defined worksheet function makes a calculation and returns a value. You can enter the Function procedure name in a worksheet cell and return a value to the cell the same way that you use a built-in Microsoft Excel worksheet function.

User-defined worksheet functions can replace one long formula or several formulas. You can combine mathematical expressions, built-in Microsoft Excel worksheet functions, and Visual Basic code. User-defined worksheet functions can also work with text, dates, and values.

A user-defined worksheet function cannot set properties or execute methods that change the Microsoft Excel environment in ways such as the following:

  • inserting, deleting, or formatting cells
  • changing cell values
  • moving, renaming, deleting, or adding sheets
  • changing the calculation mode or screen views

For more information about the CopyFromRecordset method, click Answer Wizard on the Help menu and type:

   CopyFromRecordset



Additional query words: 7.00
Keywords : PgmOthr kbprg
Version : 7.00
Platform : WINDOWS


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 3, 1997
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.