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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top