+ Reply to Thread
Results 1 to 3 of 3

refedit control cryptic returned value

  1. #1

    refedit control cryptic returned value

    I am using the refedit control on my userform. That works fine. I
    would like to see something other than the cryptic value that it
    passes.
    For example the value that I get from using refedit is:
    sheet1!$A$3:$D$5

    I would like four values that are put into variables
    A
    3
    D
    5

    How might I achieve this.
    Mary


  2. #2
    Jim Thomlinson
    Guest

    RE: refedit control cryptic returned value

    This gives you row and column of the top left and bottom right.

    Dim rng As Range

    Set rng = Range(RefEdit1.Text)

    MsgBox rng(1).Row
    MsgBox rng(1).Column
    MsgBox rng(rng.Count).Row
    MsgBox rng(rng.Count).Column

    The only difference is it uses numbers instead of letters for the columns.
    Generally the numbers are more useful, but you could convert that to letters
    if that is what you require...
    --
    HTH...

    Jim Thomlinson


    "[email protected]" wrote:

    > I am using the refedit control on my userform. That works fine. I
    > would like to see something other than the cryptic value that it
    > passes.
    > For example the value that I get from using refedit is:
    > sheet1!$A$3:$D$5
    >
    > I would like four values that are put into variables
    > A
    > 3
    > D
    > 5
    >
    > How might I achieve this.
    > Mary
    >
    >


  3. #3
    Tom Ogilvy
    Guest

    Re: refedit control cryptic returned value

    s = RefEdit.Value
    set rng = Range(s)
    set rng1 = rng(1)
    set rng2 = rng(rng.count)
    v1row = rng1.row
    v2row = rng2.row
    v1Col = rng1.column
    v2Col = rng2.column
    '
    v1Letter = left(rng.Address(0,0),2+(rng1.column<=26))
    v2Letter = Left(rng.Address(0,0),2+(rng2.Column<=26))

    --
    Regards,
    Tom Ogilvy


    <[email protected]> wrote in message
    news:[email protected]...
    > I am using the refedit control on my userform. That works fine. I
    > would like to see something other than the cryptic value that it
    > passes.
    > For example the value that I get from using refedit is:
    > sheet1!$A$3:$D$5
    >
    > I would like four values that are put into variables
    > A
    > 3
    > D
    > 5
    >
    > How might I achieve this.
    > Mary
    >




+ 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