#1   Report Post  
Luc M
 
Posts: n/a
Default create function

hi,
i've created a custom function that returns the name of the tab in which the
cell is :

ThisWorksheetName = ThisWorkbook.ActiveSheet.Name

but this is not correct because of the 'ActiveSheet' property. My function
returns the name of the active sheet but not the name of the sheet containing
my formula...

does anyone have any suggestion ?
thanks
  #2   Report Post  
Norman Jones
 
Posts: n/a
Default

Hi Luc,

Try:

ThisWorksheetName = Application.Caller.Parent.Name


---
Regards,
Norman



"Luc M" wrote in message
...
hi,
i've created a custom function that returns the name of the tab in which
the
cell is :

ThisWorksheetName = ThisWorkbook.ActiveSheet.Name

but this is not correct because of the 'ActiveSheet' property. My function
returns the name of the active sheet but not the name of the sheet
containing
my formula...

does anyone have any suggestion ?
thanks



  #3   Report Post  
Frank Kabel
 
Posts: n/a
Default

Hi
for a non VBA solution see:
http://www.xldynamic.com/source/xld.xlFAQ0002.html



--
Regards
Frank Kabel
Frankfurt, Germany

Luc M wrote:
hi,
i've created a custom function that returns the name of the tab in
which the cell is :

ThisWorksheetName = ThisWorkbook.ActiveSheet.Name

but this is not correct because of the 'ActiveSheet' property. My
function returns the name of the active sheet but not the name of the
sheet containing my formula...

does anyone have any suggestion ?
thanks



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
Formula to list unique values JaneC Excel Worksheet Functions 4 December 10th 04 12:25 AM
I cant use englisch function names in a swedich version of excel PE Excel Discussion (Misc queries) 2 December 7th 04 01:00 AM
Find a Function to use accross different worksheets R. Hale Excel Worksheet Functions 3 November 25th 04 07:07 AM
How do I create a multi formula IF function in Excel? Wazza Excel Worksheet Functions 8 November 8th 04 09:25 PM
change function variable prompts?? thinkingfield Excel Worksheet Functions 1 November 8th 04 04:01 PM


All times are GMT +1. The time now is 12:38 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"