ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   sheets count (https://www.excelbanter.com/excel-programming/340880-sheets-count.html)

Sheets number position

sheets count
 
how do I return a value for the sheets number position? I can return the name:
Sheets.Name

But I want the value 34 if it were the 34th sheet out of 50 sheets. How do
I find this?

Please advise.
Thank you

Norman Jones

sheets count
 
Hi,

The sheets index property returns its position in the sheets collection.


---
Regards,
Norman



"Sheets number position" <Sheets number
wrote in message ...
how do I return a value for the sheets number position? I can return the
name:
Sheets.Name

But I want the value 34 if it were the 34th sheet out of 50 sheets. How
do
I find this?

Please advise.
Thank you




Bob Phillips[_6_]

sheets count
 
Sheets(sheet_name).Index

--
HTH

Bob Phillips

"Sheets number position" <Sheets number
wrote in message ...
how do I return a value for the sheets number position? I can return the

name:
Sheets.Name

But I want the value 34 if it were the 34th sheet out of 50 sheets. How

do
I find this?

Please advise.
Thank you




Rowan[_9_]

sheets count
 
If you want to return the postion of the sheet then:
activesheet.index
or
sheets("MySheet").index

If you want to refer to a sheet by its postion then
sheets(34).select 'etc

hope this helps
Rowan

Sheets number position wrote:
how do I return a value for the sheets number position? I can return the name:
Sheets.Name

But I want the value 34 if it were the 34th sheet out of 50 sheets. How do
I find this?

Please advise.
Thank you



All times are GMT +1. The time now is 04:23 PM.

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