View Full Version : Solved: Finding the name of a Named range

12-18-2008, 04:48 PM
I'm building a tool that will present a dynamic quantity of sliders for a given range of values. These sliders would always sum-total 100%, and adjust all based on the movement of one. See attached for an example, but this is a fixed number of 4 sliders.

To simplify things I wanted to use the same variable name in a named range containing the slider's value and the slider's name in the userform, but when I use this code:
Sub test()

MsgBox (Range("B2").Name)

End Sub I get this output: "=Sheet1!$B$2". I am looking for the name of the range (slider1). This would help me to identify which slider to move simply by iterating through the cells within the specified range as they would have the same name.

In my searching on the web I found a few other people searching for the same thing, but no useful answers. Am I asking for something that isn't built into VBA? I can mock up a work-around, but a simple solution is preferable.

Thank in advance,


12-18-2008, 11:37 PM
Sub Test()
MsgBox Range("B2").Name.Name
End Sub

12-19-2008, 11:49 AM
Awesome! Thanks, pal!