+ Reply to Thread
Results 1 to 3 of 3

C# Automation Server and named range reference

  1. #1
    LJ
    Guest

    C# Automation Server and named range reference

    I created an automation server with custom functions and I want to
    allow the usage of named ranges. Normally when using functions and
    named ranges the cell knows which item in the named range to use. In
    my automation server the named range is passed as an object array. My
    function does not know which cell is making the call so how do I know
    from which cell to pull the text. Am I missing a property of the range
    object that figures this out or do I need to find some way to pass in
    the cell from the function is being called from?

    When I have a range with a single cell, I just grab the text.


  2. #2
    LJ
    Guest

    Re: C# Automation Server and named range reference

    Here is an example:

    If my named range is 10 cells in a column (example: MyRange = a1:a10)
    if I am calling the function from b3 passing in MyRange I will get the
    a3 value.


  3. #3
    NickHK
    Guest

    Re: C# Automation Server and named range reference

    Leo,
    In VB, it would be something like:
    Public Function RangeValue(argNamedRange As Range) As Variant
    RangeValue = argNamedRange.Range("A1").Offset(Application.Caller.Row - 1, 0)
    End Function

    NickHK

    "LJ" <[email protected]> wrote in message
    news:[email protected]...
    > Here is an example:
    >
    > If my named range is 10 cells in a column (example: MyRange = a1:a10)
    > if I am calling the function from b3 passing in MyRange I will get the
    > a3 value.
    >




+ 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