ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Sheet count (https://www.excelbanter.com/excel-programming/291654-sheet-count.html)

Hawk

Sheet count
 
How do I find the Index of the activesheet in a workbook?

For example...if the third worksheet in the worksheets
collection is active, I want a function that will return 3.

Vasant Nanavati

Sheet count
 
index of the activesheet<<

Just a wild guess, but have you tried ActiveSheet.Index? <g

--

Vasant



"Hawk" wrote in message
...
How do I find the Index of the activesheet in a workbook?

For example...if the third worksheet in the worksheets
collection is active, I want a function that will return 3.




Tom Ogilvy

Sheet count
 
Note that ActiveSheet.Index returns an index into the sheets collection, not
the worksheets collection. If you have nothing but worksheets, then they
will be the same, but if not, they won't

--
Regards,
Tom Ogilyv

"Vasant Nanavati" <vasantn *AT* aol *DOT* com wrote in message
...
index of the activesheet<<


Just a wild guess, but have you tried ActiveSheet.Index? <g

--

Vasant



"Hawk" wrote in message
...
How do I find the Index of the activesheet in a workbook?

For example...if the third worksheet in the worksheets
collection is active, I want a function that will return 3.






Hawk

Sheet count
 
Thanks...
-----Original Message-----
Note that ActiveSheet.Index returns an index into the

sheets collection, not
the worksheets collection. If you have nothing but

worksheets, then they
will be the same, but if not, they won't

--
Regards,
Tom Ogilyv

"Vasant Nanavati" <vasantn *AT* aol *DOT* com wrote in

message
...
index of the activesheet<<


Just a wild guess, but have you tried

ActiveSheet.Index? <g

--

Vasant



"Hawk" wrote in

message
...
How do I find the Index of the activesheet in a

workbook?

For example...if the third worksheet in the worksheets
collection is active, I want a function that will

return 3.




.



All times are GMT +1. The time now is 01:41 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com