+ Reply to Thread
Results 1 to 2 of 2

Referencin "Calling" Cell from VBA Function

  1. #1
    Registered User
    Join Date
    06-28-2005
    Posts
    81

    Referencin "Calling" Cell from VBA Function

    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

  2. #2
    Bob Phillips
    Guest

    Re: Referencin "Calling" Cell from VBA Function

    Use Application.Caller.AddComment to add your comment

    --
    HTH

    Bob Phillips

    (remove xxx from email address if mailing direct)

    "kayard" <[email protected]> wrote in
    message news:[email protected]...
    >
    > 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
    >
    >
    > --
    > kayard
    > ------------------------------------------------------------------------
    > kayard's Profile:

    http://www.excelforum.com/member.php...o&userid=24716
    > View this thread: http://www.excelforum.com/showthread...hreadid=542097
    >




+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1