Here is my current (appears to work!) method for updating the caption on the sole menu item on the sole toolbar of any of my applications. Comments (especially to make the code more generic, more robust) welcomed.

My application templates are ALWAYS named with 5 characters followed by a three-digit version number (thanks Kevin!) so that whenever I open a template for modification I have an option automatically to bump up the name, from to, as an example.

Most of my applications have a toolbar, just one, with a menu item, just one, on which (menu) are stored the user macros.

Instead of seeing "Neigh" on the menu on the docked toolbar, I'd like to see the version number as well, for example "Neigh107".

Providing that the initial creation of the toolbar/menu system followed at least a naming convention of using the five-character code ("Neigh" in my examples), the code below should initialize the visible menu to show the generic name AND the three-digit version number.

<pre>' FIX THE TOOLbar menu caption
' the new caption is to be the name of this template
Dim strNewName As String
strNewName = MacroContainer.FullName ' e.g. "Neigh106"
strNewName = U.strGetName(strNewName) ' e.g. ""

Dim strOldName As String ' catches the old name of this template

Dim i As Integer
For i = 1 To Application.CommandBars.Count
strOldName = Application.CommandBars(i).Name ' e.g. "Neigh105"

If Left$(strOldName, 5) = Left$(strNewName, 5) Then
Application.CommandBars(strOldName).Controls(2).Ca ption = strNewName
Exit For
End If

Next i