From which cell is my VBA function called ?

H

Helge V. Larsen

I have a VBA function that is called from many cells in several worksheets
in my workbook. The function performs some error trapping (data checking)
and gives a message if an error is found.

However, I need to retrieve information on from where the erroneous call of
the function is placed (sheet and cell).

Is it possible to get this information by VBA ?
 
A

Andy Pope

Hi,

Can you get the information you need from the activecell object?

Msgbox Activecell.parent.name & "!" & activecell.address

Cheers
Andy
 
Top