Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 81
Default Custom toolbar's name

Excel 2003

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

donwb


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,600
Default Custom toolbar's name

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" wrote in message
...
Excel 2003

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

donwb



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 81
Default Custom toolbar's name

Many thanks Peter - that works fine.

"Peter T" <peter_t@discussions wrote in message
...
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" wrote in message
...
Excel 2003

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

donwb





Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
how to limit custom toolbar's display Dingding Excel Programming 2 November 19th 07 03:53 PM
Adding custom list and text boxes to the custom tool bar from Excel C API Mousam Excel Discussion (Misc queries) 0 August 7th 07 09:19 AM
Adding custom list and text boxes to the custom tool bar from Excel C API Mousam Excel Programming 0 August 6th 07 10:05 AM
How to delete rows when List toolbar's "delete" isnt highlighted? Linda Excel Worksheet Functions 1 May 26th 05 08:39 PM
Toolbar's shape remains on the screen Haldun Alay[_3_] Excel Programming 2 October 15th 03 08:15 PM


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

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"