PC Review


Reply
Thread Tools Rate Thread

Custom toolbar's name

 
 
donwb
Guest
Posts: n/a
 
      30th Sep 2008
Excel 2003

How can I programatically identify the name of an active (Visible) custom
toolbar.

donwb


 
Reply With Quote
 
 
 
 
Peter T
Guest
Posts: n/a
 
      30th Sep 2008
On the not quite sure assumption that the ID of all custom toolbars is 1 -

Sub test3()
Dim i As Long
Dim s As String
Dim cbr As CommandBar

s = "Visible Custom Toolbars - " & vbCr

For Each cbr In Application.CommandBars
If cbr.ID = 1 And cbr.Visible Then
i = i + 1
s = s & cbr.Name & vbCr
End If
Next

s = s & "Count = " & i
MsgBox s
End Sub

Regards,
Peter T


"donwb" <(E-Mail Removed)> wrote in message
news:%(E-Mail Removed)...
> Excel 2003
>
> How can I programatically identify the name of an active (Visible) custom
> toolbar.
>
> donwb
>



 
Reply With Quote
 
donwb
Guest
Posts: n/a
 
      30th Sep 2008
Many thanks Peter - that works fine.

"Peter T" <peter_t@discussions> wrote in message
news:(E-Mail Removed)...
> On the not quite sure assumption that the ID of all custom toolbars is 1 -
>
> Sub test3()
> Dim i As Long
> Dim s As String
> Dim cbr As CommandBar
>
> s = "Visible Custom Toolbars - " & vbCr
>
> For Each cbr In Application.CommandBars
> If cbr.ID = 1 And cbr.Visible Then
> i = i + 1
> s = s & cbr.Name & vbCr
> End If
> Next
>
> s = s & "Count = " & i
> MsgBox s
> End Sub
>
> Regards,
> Peter T
>
>
> "donwb" <(E-Mail Removed)> wrote in message
> news:%(E-Mail Removed)...
>> Excel 2003
>>
>> How can I programatically identify the name of an active (Visible) custom
>> toolbar.
>>
>> donwb
>>

>
>



 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Adding custom buttons to the Standard toolbar versus a custom toolbar cainrandom@gmail.com Microsoft Outlook Program Addins 2 9th Oct 2008 05:13 PM
Saving custom toolbar or toolbar location to specific template Joseph N. Microsoft Word Document Management 0 16th Jan 2007 04:48 AM
custom toolbar buttons are saved where? Excel loads twice bymistake and all my custom toolbar buttons get gone!!! Kevin Waite Microsoft Excel Programming 2 3rd Mar 2004 03:31 PM
custom toolbar buttons are saved where? Excel loads twice bymistake and all my custom toolbar buttons get gone!!! Kevin Waite Microsoft Excel Discussion 2 3rd Mar 2004 12:32 AM
Custom toolbar - remove toolbar options? Harmannus Microsoft Access Reports 0 11th Nov 2003 04:12 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 07:02 AM.