Article ID: 188565
Article Last Modified on 10/10/2006
Sub CommandButton1_Click()
Dim SelRange as Range
Dim Addr as String
'Get the address, or reference, from the RefEdit control.
Addr = RefEdit1.Value
'Set the SelRange Range object to the range specified in the
'RefEdit control.
Set SelRange = Range(Addr)
'Apply a red pattern to the SelRange.
SelRange.Interior.ColorIndex = 3
'Unload the userform.
Unload Me
End Sub
Sub ShowForm()
UserForm1.Show
End Sub
163435 VBA: Programming Resources for Visual Basic for Applications
Additional query words: 8.00 Ref Edit user form
Keywords: kbdtacode kbhowto kbprogramming KB188565