Kris had a good idea, but unfortunately it won't work.
Here is a tested solution that does work:
Sub ABCD()
cControlTag = "ABC"
With Application.CommandBars("Cell").Controls
With .Add(temporary:=True)
.Caption = "Log New RFI(s)"
.OnAction = "'ShowForm ""LogInNew""'"
'This is crazy syntax but this is what it takes to call a sub with
'arguments using .onAction
.Tag = cControlTag
.BeginGroup = True
End With
End With
End Sub
Sub ShowForm(s As String)
VBA.UserForms.Add(s).Show
End Sub

Signature
Regards,
Tom Ogilvy
> > Sub ShowForm(FormName As UserForm)
> > FormName.Show
[quoted text clipped - 6 lines]
>
> Sub ShowForm(FormName As Object) should work.
natanz - 26 Jan 2006 20:11 GMT
thanks for that. I had actually come up with the second solution
already and was about to post it for the edification of all.
Unfortunately, i don't really understand it, but i do know it works.
that just makes it harder to remember every time i come up against the
same problem.