Quote Originally Posted by TonyJollans
Hi Kelly,

Just starting to look at this and the routine looks like it needs a bit of tidying up to make sure the file names are properly attached to the buttons, etc., but the thing you say doesn't exist is actually CommandBars.ActionControl and is just what this process needs
Tony!!!

Thank you SOOOO much!!! I wanted this to exist so badly, and I am VERY relieved that it exists.

I realize now why I couldn't find it. I was looking for the property to be part of each individual bar. You know, like each bar would keep track of the last button pressed. But since you can't simultaneously push two buttons on two bars at once, I guess it actually makes sense (sort of) for the whole CommandBars collection to keep track of the last button pressed.

Thank you thank you thank you!!!

so now we could change DeleteToolbar with something like:

Sub DeleteToolbar()

NameOfFile = CommandBars.ActionControl.Caption
'open the file or whatever
CommandBars("Template Toolbar").Delete

End Sub