XL: Special Button Unavailable Go To Called from Macro

ID: Q121379


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

Additional query words: 5.00c 97 gpf grey gray greyed access dimmed

Keywords :
Version : 5.00c 7.00
Platform : WINDOWS
Issue type :


Last Reviewed: September 14, 1999
© 2000 Microsoft Corporation. All rights reserved. Terms of Use.