Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 67
Default VBA - identifying which worksheet is active

Must be the weather or something but ...
I am having problems working out how to retrieve the sequential number of an
active worksheet (Activeworksheet does not supptort the various properties I
have tried...). Yeah, I know, should be trivial but I am obviosuly not
thinking of the right key words to find any help either. Suggestions much
appreciated. All I want to do really is count how many more worksheets I have
after the active one.
Many thanks and best wishes.
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,202
Default VBA - identifying which worksheet is active

The property you are looking for is Index...

NumberOfSheetsRemaining = Worksheets.Count - ActiveSheet.Index

Rick


"Boris" wrote in message
...
Must be the weather or something but ...
I am having problems working out how to retrieve the sequential number of
an
active worksheet (Activeworksheet does not supptort the various properties
I
have tried...). Yeah, I know, should be trivial but I am obviosuly not
thinking of the right key words to find any help either. Suggestions much
appreciated. All I want to do really is count how many more worksheets I
have
after the active one.
Many thanks and best wishes.


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 67
Default VBA - identifying which worksheet is active

Thanks Rick, very good of you to reply. I had thought of "index" but, when I
tried it in my immediate window, I got a VB error message to say that the
property was not suppoted... Must have mistyped something!
Many thanks again, Boris.

"Rick Rothstein (MVP - VB)" wrote:

The property you are looking for is Index...

NumberOfSheetsRemaining = Worksheets.Count - ActiveSheet.Index

Rick


"Boris" wrote in message
...
Must be the weather or something but ...
I am having problems working out how to retrieve the sequential number of
an
active worksheet (Activeworksheet does not supptort the various properties
I
have tried...). Yeah, I know, should be trivial but I am obviosuly not
thinking of the right key words to find any help either. Suggestions much
appreciated. All I want to do really is count how many more worksheets I
have
after the active one.
Many thanks and best wishes.



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Identifying cursor in active spreedsheet C Ambrose Excel Worksheet Functions 9 May 24th 05 11:36 PM
Identifying the Active Fill Color Steve Conary Excel Discussion (Misc queries) 3 December 9th 04 04:45 AM
Identifying the Active Fill Color Steve Conary Excel Programming 3 December 9th 04 04:45 AM
Identifying the active cell Pienpeas Excel Programming 2 September 15th 04 12:13 PM


All times are GMT +1. The time now is 07:54 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"