• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

Cell values of the selected range using RefEdit control in Excel 2007

pvharibabu

New Member
How do I get the cell values of the selected range using RefEdit control in Excel 2007?


I have a RefEdit control in an userform, used to select a range in a worksheet and want to use the cell values for my further calculations. Wondering how I get these values.
 
Untested:


You can try a loop like:

[pre]
Code:
Dim rng as Range
For each rng in Range(Me.RefEdit1.Text)
msgbox rng.value
next rng
Or populate an array:

Dim aryData as variant
aryData = Range(Me.RefEdit1.Text).Value
[/pre]
and then use it in your code.
 
Back
Top