Application.Caller

M

Marcelo

Hi all,

I am trying to use this Chip Person function, it doesn't work, if I use
=thissheetname()

Function ThisSheetName() As String
Application.Volatile True
ThisSheetName = Application.Caller.Parent.Name
End Function

who knows why?

regards from Brazil - going to the 6th *
Marcelo
 
A

Ardus Petus

Works by me!

I entered =ThisSheetName() in a cell, it returned Feuil1, which is exact.

HTH
 
M

Marcelo

Hi Ardus, its return #name? here.

did you paste the code in a Module or in a class Module

regards
Marcelo



"Ardus Petus" escreveu:
 
A

Ardus Petus

I pasted it in a standard module.

Cheers,
--
AP

Marcelo said:
Hi Ardus, its return #name? here.

did you paste the code in a Module or in a class Module

regards
Marcelo



"Ardus Petus" escreveu:
 
V

Vincnet.

Hi!
Just a comment: why use a macro when you have formula to do the job?
When needed, I use the following one:
=RIGHT(CELL("filename",A2),LEN(CELL("filename",A2))-FIND("]",CELL("filename",A2)))
 
A

Ardus Petus

I did not actually enter the formula, but used the function wizard.

enter:
=[PERSONAL.XLS].ThisSheetName()

HTH
 
M

Marcelo

thanks Ardus, it's works

regards from Brazil

"Ardus Petus" escreveu:
I did not actually enter the formula, but used the function wizard.

enter:
=[PERSONAL.XLS].ThisSheetName()

HTH
 
Top