ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   sheet number (https://www.excelbanter.com/excel-programming/388206-sheet-number.html)

eugene

sheet number
 
Hi,

Really simple question.
I know that one can select a sheet by using "sheets(i)" where "i" is the
relative number of the sheet in the workbook.
But how does one do the reverse - get the sheet number of the active sheet?
I tried "help" but could not find an answer.

-
eugene

Norman Jones

sheet number
 
Hi Eugene,

Try :

Dim i As Long

i = ActiveSheet.Index


---
Regards,
Norman



"eugene" wrote in message
...
Hi,

Really simple question.
I know that one can select a sheet by using "sheets(i)" where "i" is the
relative number of the sheet in the workbook.
But how does one do the reverse - get the sheet number of the active
sheet?
I tried "help" but could not find an answer.

-
eugene




eugene

sheet number
 
perfect
thanks

--
eugene


"Norman Jones" wrote:

Hi Eugene,

Try :

Dim i As Long

i = ActiveSheet.Index


---
Regards,
Norman



"eugene" wrote in message
...
Hi,

Really simple question.
I know that one can select a sheet by using "sheets(i)" where "i" is the
relative number of the sheet in the workbook.
But how does one do the reverse - get the sheet number of the active
sheet?
I tried "help" but could not find an answer.

-
eugene






All times are GMT +1. The time now is 12:25 AM.

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