View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.programming
Tom Ogilvy Tom Ogilvy is offline
external usenet poster
 
Posts: 27,285
Default Command Bar with Number in Name

Excel 2002:

Sub AddToolbar()
Dim objA10Bar As CommandBar
On Error Resume Next
CommandBars("A10 Checklist").Delete
On Error GoTo 0
Set objA10Bar = CommandBars.Add(Name:="A10 Checklist", _
Position:=msoBarFloating, Temporary:=True)
objA10Bar.Visible = True
End Sub


Worked fine for me.

--
Regards,
Tom Ogilvy

"Matt Jensen" wrote in message
...
Hmm, maybe my method of elimination was incorrect.
I'm on Excel 2002, XP Pro
And yes, I do make it visible
Cheers
Matt

"Bob Phillips" wrote in message
...
Matt,

Not what you want to hear, but it loaded fine for (XL2000, XP Pro).

Do you get an error, or just no toolbar (you do make it visible don't
you?).?

--

HTH

RP
(remove nothere from the email address if mailing direct)


"Matt Jensen" wrote in message
...
My app is (unfortunately (for cell reference reasons)) named the A10
Checklist. I've created a menu bar for it which loads fine etc.,

unless
I
try to call the tool/command bar A10 Checklist. if I take out the 10

it
works fine. i.e..

Dim objA10Bar As CommandBar
Set objA10Bar = CommandBars.Add(Name:="A10 Checklist",
Position:=msoBarFloating, Temporary:=True)

the above does not work, whereas

Dim objA10Bar As CommandBar
Set objA10Bar = CommandBars.Add(Name:="A Checklist",
Position:=msoBarFloating, Temporary:=True)

works fine. How can I add a number into the toolbar name?
Thanks
Matt