ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Command Bar with Number in Name (https://www.excelbanter.com/excel-programming/318843-command-bar-number-name.html)

Matt Jensen

Command Bar with Number in Name
 
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



Bob Phillips[_6_]

Command Bar with Number in Name
 
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





Matt Jensen

Command Bar with Number in Name
 
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







Tom Ogilvy

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









Matt Jensen

Command Bar with Number in Name
 
Excellent - thanks guys
Think it was just me :-)
Cheers
Matt

"Tom Ogilvy" wrote in message
...
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












All times are GMT +1. The time now is 08:03 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com