XL: Special Button Unavailable Go To Called from Macro

Last reviewed: June 3, 1997
Article ID: Q121379
5.00c 7.00 WINDOWS kbprg

The information in this article applies to:

  • Microsoft Excel for Windows, version 5.0c
  • Microsoft Excel for Windows 95, version 7.0
  • Microsoft Excel 97 for Windows

SYMPTOMS

In Microsoft Excel, when you use a macro or Visual Basic procedure to call the Go To dialog box, the Special button is unavailable.

CAUSE

This behavior occurs because you should not be able to "tunnel" or bring up a second dialog box, when the first dialog box was called from a macro.

WORKAROUNDS

To work around this behavior, do either of the following:

  • Display the Go To Special dialog box directly, without displaying the Go To dialog box first as in the following Visual Basic example

          Application.Dialogs(xlDialogSelectSpecial).Show
    

    or the following version 4.0 macro example:

          =SELECT.SPECIAL?()
    

    -or-

  • Access the options in the Go To Special dialog box directly using either the version 4.0 macro language, or the Visual Basic language.

    The following examples select the cells on the active worksheet that contain constant values:

    Visual Basic Example --------------------

          Sub Select_Constants()
             Selection.SpecialCells(xlConstants, 23).Select
          End Sub
    
    
Microsoft provides examples of Visual Basic procedures 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 Visual Basic procedure is provided 'as is' and Microsoft does not guarantee that it can be used in all situations. Microsoft does not support modifications of this procedure to suit customer requirements for a particular purpose.

   Version 4.0 Macro Example
   -------------------------

      A1: SelectCells
      A2: =SELECT.SPECIAL(2,23)
      A3: =RETURN()

Microsoft provides macro 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 macro is provided as is and Microsoft in no way guaranties that the following code can be used in all situations and will not support modifications of the code to suit specific customer requirements.

REFERENCES

For more information about the Show Method, choose the Search button in the Visual Basic Reference and type:

    Show Method


KBCategory: kbprg
KBSubcategory:

Additional reference words: 5.00c 7.00 97 gpf grey gray greyed access
dimmed
Keywords : kbprg
Version : 5.00c 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: June 3, 1997
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.