Set objCBSearch = cbrEdit.Controls.Add(,1849) - will not work???

  • Thread starter Thread starter Ole Bergtun
  • Start date Start date
O

Ole Bergtun

I have this form where i build a pretty similar CommandBar like Menu
Bar, i have managed to build them the way i like almost...

On the edit CommandBarPopup i only want the find button but the addin
fails when i :
Set cbrEdit = cbrMyMinorMenuBarToolBar.Controls.Add(, 30003, , 2) '
Works
Set objCBSearch = cbrEdit.Controls.Add(,1849) 'failes

The error message that appears is like this:

-2147467259 - Method 'Add' of object 'CommanBarControls' failed

I appreciate all suggestions or if others have experienced likewise to
answer and share what you did to resolve this problem

Med vennlig hilsen
Ole Bergtun
 
Try this:

Set objCBSearch = cbrEdit.CommandBar.Controls.Add(,1849) 'failes

A CommandBarPopup has a CommandBar object property
--
Sue Mosher, Outlook MVP
Outlook and Exchange solutions at http://www.slipstick.com
Author of
Microsoft Outlook Programming: Jumpstart
for Administrators, Power Users, and Developers
 
Back
Top