LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 923
Default Toolbar Menu problems

I have set the following code up to create a new toolbar, it works until I
try to add the rsOp1 and rsOp2 popup items - what is wrong with this code?

Dim rsTB As CommandBar
Set rsTB = Application.CommandBars.Add(Name:="rsTB", Position:=msoBarTop,
MenuBar:=False)
rsTB.Visible = True
rsTB.Protection = msoBarNoChangeVisible + msoBarNoResize +
msoBarNoChangeDock

Dim rsBut As CommandBarPopup
Dim rsOp1 As CommandBarPopup, rsOp2 As CommandBarPopup

Set rsBut =
Application.CommandBars("rsTB").Controls.Add(Type: =msoControlPopup,
befo=1)
Set rsOp1 = Application.CommandBars("rsTB").Controls("rsBut"). Controls.Add()
Set rsOp2 = Application.CommandBars("rsTB").Controls("rsBut"). Controls.Add()

rsBut.Caption = "SAM Report"
rsOp1.Caption = "Summary"
rsOp2.Caption = "Targets"

--
Cheers
Nigel




 
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
Toolbar problems AOU Excel Discussion (Misc queries) 1 April 25th 07 12:22 PM
Toolbar/Menu Bar Big Dave Excel Discussion (Misc queries) 2 January 17th 07 02:56 PM
Can't find menu toolbar Brian B Excel Discussion (Misc queries) 2 June 22nd 06 09:01 PM
Toolbar Problems Stefan_B Excel Programming 1 April 6th 05 11:05 AM
icon in menu toolbar roland Excel Programming 1 November 20th 03 01:29 PM


All times are GMT +1. The time now is 06:50 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"