Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 13
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 486
Default 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


" 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default 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


wrote in message
oups.com...
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
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
RefEdit control Dave[_59_] Excel Programming 2 August 9th 05 04:42 AM
RefEdit control Dave[_59_] Excel Programming 0 August 8th 05 11:23 PM
RefEdit control Tim[_39_] Excel Programming 2 August 10th 04 07:02 PM
Shift-Control Arrow and RefEdit Control? Ariel[_2_] Excel Programming 12 January 6th 04 11:10 PM
RefEdit control bug Dag Johansen[_6_] Excel Programming 1 October 20th 03 12:32 PM


All times are GMT +1. The time now is 12:57 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"