Return position of a sheet in a workbook
Here's a function that returns the index
Function CurrentLocation() As Integer
CurrentLocation = ActiveWorkbook.ActiveSheet.Index
End Function
--
Kevin Backmann
"XP" wrote:
I am using Office 2003 on Windows XP.
I need a function that would return an integer or a long that indicates the
current position of the active sheet, counting the sheets from left to right.
So if you have sheets named: RawData, Reports, Data, and Calcs in a workbook
and "Data" is currently the active sheet, the function should return 3.
Your example code would be most appreciated. Thanks much in advance.
|