By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
464,806 Members | 1,289 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 464,806 IT Pros & Developers. It's quick & easy.

Get the name or HelpContextID of a Toolbar Object?

P: n/a
I'm trying to extract the name of a toolbar object in order to execute
Help files based the object in the toolbar.

I'm using the following code if I know the name of the toolbar object:

Dim objBar As CommandBar
Dim myHelpContextID as integer
Set objBar = Application.CommandBars("myToolbarName")
myHelpContextID = objBar.Controls("myToolbarObjectName").HelpContext Id
What I'm trying to do is to obtain the name of the toolbar object:

Dim objBar As CommandBar
Dim myHelpContextID as integer
Dim myTBO as string
Set objBar = Application.CommandBars("myToolbarName")
myTBO = ???
myHelpContextID = objBar.Controls(myTBO).HelpContextId

Any help is appreciated
lq
Nov 12 '05 #1
Share this Question
Share on Google+
1 Reply

P: n/a
TC
I don't think toolbar controls have a .Name. They just have a .Caption.
grrrrr :-(

Does that help?
TC
"Lauren Quantrell" <la*************@hotmail.com> wrote in message
news:47**************************@posting.google.c om...
I'm trying to extract the name of a toolbar object in order to execute
Help files based the object in the toolbar.

I'm using the following code if I know the name of the toolbar object:

Dim objBar As CommandBar
Dim myHelpContextID as integer
Set objBar = Application.CommandBars("myToolbarName")
myHelpContextID = objBar.Controls("myToolbarObjectName").HelpContext Id
What I'm trying to do is to obtain the name of the toolbar object:

Dim objBar As CommandBar
Dim myHelpContextID as integer
Dim myTBO as string
Set objBar = Application.CommandBars("myToolbarName")
myTBO = ???
myHelpContextID = objBar.Controls(myTBO).HelpContextId

Any help is appreciated
lq

Nov 12 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.