Microsoft KB Archive/110556

From BetaArchive Wiki

Microsoft Knowledge Base

EXCEL: Removing Unbound Sheet with WORKBOOK.MOVE()

Last reviewed: September 12, 1996
Article ID: Q110556

The information in this article applies to:

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

The Microsoft Excel "Function Reference" version 4.0, states that you can remove a bound sheet from a workbook by using a macro with the WORKBOOK.MOVE() command. You can also remove an unbound sheet with this command, but the procedure is slightly different than the one explained in the reference.

To remove an unbound worksheet from a workbook, only the worksheet filename should be specified (in quotation marks) for the name_array argument. However, you must first activate the Workbook Contents screen and select the unbound worksheet before you can remove it. For example:

   =WORKBOOK.ACTIVATE(,FALSE)
   =WORKBOOK.SELECT("SALES.XLS","SALES.XLS")
   =WORKBOOK.MOVE("SALES.XLS")

To remove a bound worksheet from a workbook, specify the workbook name and the filename (in quotation marks) for the name_array argument:

   =WORKBOOK.MOVE("[TEST.XLW]SALES.XLS")

Note that this does not require activation of the Workbook Contents screen and selection of the worksheet to remove prior to issuing the WORKBOOK.MOVE command.

REFERENCES

"Function Reference," version 4.0, pages 463-463


KBCategory: kbusage

KBSubcategory:

Additional reference words: 4.00 4.00a howto



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.