Test if Function is Run from worksheet or from VBA
One mo
if typename(application.caller) = "Range" then
'called from a cell
else
'not called from a cell
end if
(Case is important in "Range".)
Andibevan wrote:
Is there any way I can test whether a function has been called because it is
used in a cell, or whether it is called from code?
--
Dave Peterson
|