View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.programming
Bob Phillips[_6_] Bob Phillips[_6_] is offline
external usenet poster
 
Posts: 11,272
Default Extracting worksheet index

You need to be aware that adding/deleting a new does not trigger a recalc,
so the index doesn't get automatically updated.

--

HTH

RP
(remove nothere from the email address if mailing direct)


"Myrna Larson" wrote in message
...
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?