On a user form, this control displays the address of a range of cells that you've entered or selected on one or more worksheets. To select a range, click the button in the control to collapse the user form, select the range, and then click the button in the control again to expand the user form.
If the RefEdit control is embedded on a worksheet, you can link the contents of the control to a cell on any worksheet in that workbook.
The default property for a RefEdit control is Value.
The default event for a RefEdit control is BeforeDragOver.
You cannot use a RefEdit control on a modeless user form. You can use the ShowModal property to set a user form to modal.
This example sets the control tip text for the RefEdit1 control in UserForm1, and then it displays the user form.
UserForm1.RefEdit1.ControlTipText = _
"The selected range of data in the worksheet"
UserForm1.Show
Later, the user clicks CommandButton1 in UserForm1. This example of an event-handling procedure displays the address of the selected worksheet range and then ends the program.
Private Sub CommandButton1_Click()
MsgBox RefEdit1.Value
End
End Sub