Hi Jeff,
You can't make any modifications to a built-in control of type
msoControlButtonPopup.
--
Rob Bovey, Excel MVP
Application Professionals
http://www.appspro.com/
* Take your Excel development skills to the next level.
* Professional Excel Development
http://www.appspro.com/Books/Books.htm
"trooper665" <trooper665@discussions.microsoft.com> wrote in message
news:26309E73-0DD6-4466-8A51-796F2194DFD0@microsoft.com...
>I am trying to add a button to a popup control, but I am getting an error
> message saying that the add method failed. Here is the code that I am
> using.
> This code works for other controls.
>
> Set oPop = Application.CommandBars("BPT_BOTTOM").Controls.Add
> (Type:=msoControlPopup, Id:=30080, Before:=2)
>
> oPop.Caption = "Change IT!"
> 'basic shapes------------------------------------------------
>
> Set oSecondPop = oPop.Controls.Add(Type:=msoControlButtonPopup, Id:=1405,
> Before:=1)
>
> oSecondPop.Controls.Add Type:=msoControlButton, Id:=1232
>
> Does anyone know what I am doing wrong?
>
> Thanks,
> Jeff
>
Bookmarks