View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.programming
Myrna Larson Myrna Larson is offline
external usenet poster
 
Posts: 863
Default Extracting worksheet index

This line should do what the OP requests:

SheetNumber = Application.Caller.Parent.Index

On Wed, 23 Mar 2005 17:35:03 -0800, "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?