none
Resizable, draggable borders

    Question

  • I need to copy the behavior of the formula editor: highlight multiple ranges of cells with different colored borders that are draggable and resizable. How can I accomplish this using VSTO or VBA?

    Thanks,

    Gareth.

    Thursday, February 07, 2013 7:40 AM

Answers

  • Got it. It appears MSFT went on to improve refedit internally within Excel.
    Technically, the exposed Refedit control could have been improved with that functionality....but was not.

    Wow, you are talking some significant work in C# dot-net to pull this off as a COM addin.
    Good luck.

    Friday, February 08, 2013 2:11 PM

All replies

  • I believe you are referring to the RefEdit control which is in the VBA Controls toolbox.

    That being said, the use of the control has been controversial due to a bug.
    I'm not sure if it's been fixed in Excel 2010, but in previous releases, RefEdit would lose focus and essentially disable the keyboard. I remember having to put in code that would detect when the mouse cursor was over an opened form which contained the RefEdit control and then re-establish focus.

    Thursday, February 07, 2013 2:04 PM
  • Thanks Syswizard. I'm not interested in that portion of functionality. I'm only interested in highlighting multiple ranges of cells with the special draggable/resizable border. This is what happens when you click the formula bar and the formula has multiple ranges specified eg: SUM(A1:B3, C4:D7, E5:E8). In this case each of the three ranges will have a border of a different colour, and the border will have small squares in each corner.

    These borders are special, and I can't find a way to emulate them.

    Thursday, February 07, 2013 8:26 PM
  • Got it. It appears MSFT went on to improve refedit internally within Excel.
    Technically, the exposed Refedit control could have been improved with that functionality....but was not.

    Wow, you are talking some significant work in C# dot-net to pull this off as a COM addin.
    Good luck.

    Friday, February 08, 2013 2:11 PM