View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
Rowan[_2_] Rowan[_2_] is offline
external usenet poster
 
Posts: 226
Default Extracting worksheet index

Actually scrap that. Doesn't work when the sheet focus changes.

"Rowan" wrote:

How about

Function thisSheet()
thisSheet = ActiveSheet.Index
End Function

Rowan

"Ziv" wrote:

I am trying to write a UDF that extract the worksheet index of the cell that
contains the UDF , similar to ThisCell or Thisworkbook. Any suggestions?