RefEdit with a color frame-type selecting tool

Elmer86

New Member
Joined
Aug 26, 2011
Messages
1
Hello,
It's my first time posting on this forum, but I couldn't find an answer anywhere else and it got me really frustrated.
Is it possible to somehow create and control the colorful range selection frames that appear when you type formulas with references to cell addresses?
For instance when you type "=A1" in a cell, a blue frame will appear around A1, which you can then drag around.

I have a userform with 4 separate RefEdit input boxes and I really wish the user could clearly see all the ranges he selected.
I tried to work around it by executing code which changed the background of a range in the RefEdit_change event (first changing back the background of the cells it marked before). The code was as follows:

Dim OldRng As Range
Private Sub RefEdit1_Change()
If Not OldRng Is Nothing Then OldRng.Interior.ColorIndex = 0
On Error GoTo Errorhandler:
Set NewRng = Range(RefEdit1.Value)
NewRng.Interior.ColorIndex = 3
Set OldRng = NewRng
On Error GoTo 0
Exit Sub
Errorhandler:
Exit Sub
Resume Next
End Sub

It more or less works, but I feel like I'm trying to brake down an open door here. Does anyone have any tips?
Any help much appreciated, if you don't feel like typing an entire reply but know what i'm talking about please just post the proper name of the tool i'm trying to learn to use in this thread so I know what to google for.
 

Excel Facts

Format cells as time
Select range and press Ctrl+Shift+2 to format cells as time. (Shift 2 is the @ sign).

Forum statistics

Threads
1,215,049
Messages
6,122,864
Members
449,097
Latest member
dbomb1414

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top