Referencin "Calling" Cell from VBA Function

  • Thread starter Thread starter kayard
  • Start date Start date
K

kayard

Hi,

can anybody tell me how I can insert into the comment of the cell from
which a vba Function is called a message ?

Example:

VBA custom Function: GetPrice(Date As String; ProductCode As String)
Say that in cell A1 I put: =GetPrice("01/02/2005";"AAAX001")
I would like the function to return the price if available or write
into the comment the explanation of an error (if any)

Thanks in advance

Paolo

From Italy
 
Use Application.Caller.AddComment to add your comment

--
HTH

Bob Phillips

(remove xxx from email address if mailing direct)
 

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

Back
Top