XL5: Subroutine Can't Tell Which Sheet Tabs Are VisibleLast reviewed: September 12, 1996Article ID: Q108643 |
The information in this article applies to:
- Microsoft Excel for Windows, version 5.0
SUMMARYIn 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 INFORMATIONIt 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.Nameor 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.
|
KBCategory: kbusage
© 1998 Microsoft Corporation. All rights reserved. Terms of Use. |