XL3/XL4: Macro to Open an Add-in for Editing

Last reviewed: February 2, 1998
Article ID: Q100944

The information in this article applies to:
  • Microsoft Excel for Windows, versions 3.0, 4.0, 4.0a
  • Microsoft Excel for OS/2, version 3.0
  • Microsoft Excel for the Macintosh, versions 3.0, 4.0

SUMMARY

In the versions of Microsoft Excel listed above, it is possible to create a macro that will open an add-in macro sheet so that you can edit it.

MORE INFORMATION

To manually open a Microsoft Excel add-in macro sheet for edit it, you have to hold down the SHIFT key when you open the file. To simulate this behavior in a macro, use the method appropriate to your version of Microsoft Excel.

Microsoft provides programming examples for illustration only, without warranty either expressed or implied, including, but not limited to, the implied warranties of merchantability and/or fitness for a particular purpose. This article assumes that you are familiar with the programming language being demonstrated and the tools used to create and debug procedures. Microsoft support engineers can help explain the functionality of a particular procedure, but they will not modify these examples to provide added functionality or construct procedures to meet your specific needs. If you have limited programming experience, you may want to contact the Microsoft fee-based consulting line at (800) 936-5200. For more information about the support options available from Microsoft, please see the following page on the World Wide Web:

   http://www.microsoft.com/supportnet/refguide/ 


Microsoft Excel Version 3.0 or 4.0

To open an add-in macro for editing in Microsoft Excel version 3.0 or 4.0, you can use the following sample macro code

   A1: =OPEN("ADDIN.XLA")
   A2: =ACTIVATE("ADDIN.XLA")
   A3: =NEW.WINDOW()
   A4: =ACTIVATE("ADDIN.XLA:1")
   A5: =CLOSE()
   A6: =RETURN()

where:
  • Cell A1 of the macro opens the add-in macro ADDIN.XLA, which remains invisible.
  • Cell A2 activates ADDIN.XLA.
  • Cell A3 creates a new window, titled "ADDIN.XLA:2." Because of the way in which the NEW.WINDOW() command works, this new window is visible.
  • Cell A4 activates ADDIN.XLA:1, which is still invisible.
  • Cell A5 closes the ADDIN.XLA:1 window. Since there is only one other window containing ADDIN.XLA (ADDIN.XLA:2), that window's title changes to ADDIN.XLA.
  • Cell A6 ends the macro.

Microsoft Excel for Windows or OS/2

To open an add-in macro for editing in Microsoft Excel for Windows or Microsoft Excel for OS/2, you can use the following sample macro code

   A1: =SEND.KEYS("%FO",TRUE)
   A2: =SEND.KEYS("ADDIN.XLA+~",TRUE)
   A3: =RETURN()

where:
  • Cell A1 of the macro sends the key combination ALT+F+O, which is the same as selecting Open from the File menu.
  • Cell A2 sends the name of the add-in macro (ADDIN.XLA) followed by a SHIFT+ENTER key combination. This is equivalent to holding down the SHIFT key while opening the add-in macro.
  • Cell A3 ends the macro.

NOTE: This second method does not work in Microsoft Excel for the Macintosh because the SEND.KEYS() command is not available in Microsoft Excel for the Macintosh.

REFERENCES

"Function Reference," version 4.0, page 385 "Function Reference," version 3.0, pages 214-215


Additional query words: 3.00 4.00 4.00a addin international hidden howto
XL3 XL4
Keywords : kbmacro
Version : WINDOWS:3.0,4.0,4.0a; OS/2:3.0; MACINTOSH:3.0,4.0
Platform : MACINTOSH OS/2 WINDOWS
Issue type : kbinfo


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