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)
 
Back
Top