Help! This has been driving me mad for too long. And it should be stunningly simple but I cannot get it right.

What I want to do is create a custom function that will allow me to pass the name of a shape to it so that I can then pick up the text in it. So for instance I have shape opt_P1 and I'd like to pick out the text in it using a formula. Something like:

Function get_box_state(box As shape)

get_box_state= Shapes(box).TextFrame.Characters.Text

End Function
Or something like that - seeing as it fails miserably if I use =get_box_state(opt_P1).

Any tips to get me out of my own hell?