![]() |
Trouble finding a CommandBarControl by it |
Post Reply ![]() |
Author | |
fernando ![]() Groupie ![]() ![]() Joined: 22 May 2006 Status: Offline Points: 25 |
![]() ![]() ![]() ![]() ![]() Posted: 13 June 2006 at 7:05pm |
Hi,
What's the best way to retrieve a CommandBarControl from a CommandBar by its ID? I tried the following, but it didn't work: ---------------------------------------------------- Dim rc As CommandBarControl Set rc = m_rMenuBar.Controls.Find(, eFile, , 1) ---------------------------------------------------- The ID is eFile and the commandbarcontrol is there. However, the Find method always returns Nothing What am I doing wrong??? Thanks |
|
![]() |
|
SuperMario ![]() Admin Group ![]() ![]() Joined: 14 February 2004 Status: Offline Points: 18057 |
![]() ![]() ![]() ![]() ![]() |
I assume eFile is a popupcontrol? If so, you must amnually assign it an id.
Set ControlFile = CommandBars.ActiveMenuBar.Controls.Add(xtpControlPopup, 0, "&File", -1, False) ControlFile.Id = 101 It will ignore what is passed in to the Add method. |
|
![]() |
Post Reply ![]() |
|
Tweet
|
Forum Jump | Forum Permissions ![]() You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |