RefEdit Control Example

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