Microsoft KB Archive/108643

From BetaArchive Wiki

XL5: Subroutine Can't Tell Which Sheet Tabs Are Visible



The information in this article applies to:


Microsoft Excel for Windows, version 5.0





SUMMARY

In Microsoft Excel version 5.0, it is not possible for a Microsoft Excel version 5.0 macro or a Visual Basic subroutine to determine which sheet tabs are visible at any given time.



MORE INFORMATION

It is not possible to determine which sheet tabs are visible because of the way in which sheets and sheet tabs interact with each other. It is not necessarily true that you can see the sheet tab for the active sheet, since you can use the tab scrolling buttons to scroll left and right without actually activating a sheet.

For example, if you have a workbook that contains 50 worksheets, named Sheet1, Sheet2, Sheet3, and so on, you can activate Sheet1 and then use the tab scrolling buttons to scroll all the way to Sheet50 without actually activating any other sheet.

To determine the name of the ACTIVE sheet, you can use the Visual Basic procedure

   ActiveSheet.Name 

or the Microsoft Excel version 4.0 macro command:

   =RIGHT(GET.DOCUMENT(1),LEN(GET.DOCUMENT(1))-
    SEARCH("]",GET.DOCUMENT(1),1)) 

NOTE: The above command must be entered as a single line, with no spaces.

Additional query words: 5.00

Keywords :
Version : 5.00
Platform : WINDOWS
Issue type :
Technology :


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