#1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 493
Default SheetName

One way:

Public Function SheetName() As String
SheetName = Application.Caller.Parent.Name
End Function

You can also do it without UDFs:

=MID(CELL("filename",A1), FIND("]", CELL("filename",A1))+1, 255)

Note that the file needs to be saved for this to work.

In article ,
"Heapy" wrote:

I need to develop a function that returns the name of the worksheet on which
the function is located.

It's probably a simple little thing, but I can't think of it right now.

Thx
HWH


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 14
Default SheetName

Thx John.


"J.E. McGimpsey" wrote in message
...
One way:

Public Function SheetName() As String
SheetName = Application.Caller.Parent.Name
End Function

You can also do it without UDFs:

=MID(CELL("filename",A1), FIND("]", CELL("filename",A1))+1, 255)

Note that the file needs to be saved for this to work.

In article ,
"Heapy" wrote:

I need to develop a function that returns the name of the worksheet on

which
the function is located.

It's probably a simple little thing, but I can't think of it right now.

Thx
HWH




Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
sheetname tjp[_2_] Excel Worksheet Functions 3 March 5th 09 12:11 PM
Automatically update SheetName in workbook sub if SheetName changes [email protected] Excel Discussion (Misc queries) 3 February 29th 08 04:33 PM
Does anyone see this .xls]sheetname? Eric Excel Worksheet Functions 2 January 21st 07 03:28 PM
Does anyone see this .xls]sheetname? Eric Excel Discussion (Misc queries) 2 January 21st 07 03:04 PM
Sheetname formula John S Excel Worksheet Functions 3 December 5th 06 07:34 PM


All times are GMT +1. The time now is 01:30 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"