Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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
|
|||
|
|||
![]()
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
|
|||
|
|||
![]()
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
|
|||
|
|||
![]()
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
|
|||
|
|||
![]()
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 | |
|
|
![]() |
||||
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 |