Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Extracting worksheet index
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? |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Extracting worksheet index
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? |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
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? |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
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? |
#5
Posted to microsoft.public.excel.programming
|
|||
|
|||
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? |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Extracting data from one worksheet to another? | Excel Discussion (Misc queries) | |||
Extracting data into another worksheet | Excel Discussion (Misc queries) | |||
Extracting data from large worksheet | Excel Worksheet Functions | |||
Extracting worksheet names.... | Excel Worksheet Functions | |||
resequence worksheet index after deletion of worksheet | Excel Programming |