custom toolbar options

ishi

Board Regular
Joined
Apr 3, 2003
Messages
126
I'll stick with excel for a while. Enough confusion here but thanks to you guys life is somewhat less painful :)

ishi
 

Some videos you may like

Excel Facts

Format cells as time
Select range and press Ctrl+Shift+2 to format cells as time. (Shift 2 is the @ sign).

ishi

Board Regular
Joined
Apr 3, 2003
Messages
126
just another question is it possible to change the background colour of the custom toolbars from the rather boring grey.

Thanks,

ishi
 

TommyGun

MrExcel MVP
Joined
Dec 9, 2002
Messages
4,202
Nope (at least not in XL 97). This is set by your Windows color schemes.
 

TommyGun

MrExcel MVP
Joined
Dec 9, 2002
Messages
4,202
Don't have that here, or I would check, but I don't think you can do that with 2000 either.
 

ishi

Board Regular
Joined
Apr 3, 2003
Messages
126
I have somewhat got hang of the toolbar apart from being able to have many buttons under one button (if that makes sense). For example in excel under file you have new-open-close all under file. This is what i am trying to create but not very successfully.

another suggestion please.

ishi
 

TommyGun

MrExcel MVP
Joined
Dec 9, 2002
Messages
4,202
If you are trying to create a "menu" on a toolbar, then you have to use the PopUp control and then add controls to it.

<font face=Courier New><SPAN style="color:#00007F">Sub</SPAN> CreateToolbar()
    <SPAN style="color:#00007F">Dim</SPAN> TB <SPAN style="color:#00007F">As</SPAN> CommandBar
    <SPAN style="color:#00007F">Dim</SPAN> MyMenu <SPAN style="color:#00007F">As</SPAN> CommandBarPopup
    <SPAN style="color:#00007F">Dim</SPAN> MyMenuItem <SPAN style="color:#00007F">As</SPAN> CommandBarButton

    <SPAN style="color:#00007F">Set</SPAN> TB = Application.CommandBars.Add(Name:="TestThis")
    <SPAN style="color:#00007F">Set</SPAN> MyMenu = TB.Controls.Add(Type:=msoControlPopup)
    <SPAN style="color:#00007F">Set</SPAN> MyMenuItem = MyMenu.Controls.Add(Type:=msoControlButton)

    MyMenu.Caption = "Test Menu"

    MyMenuItem.Caption = "Test Menu Item"

    TB.Visible = <SPAN style="color:#00007F">True</SPAN>

    <SPAN style="color:#00007F">Set</SPAN> MyMenuItem = <SPAN style="color:#00007F">Nothing</SPAN>
    <SPAN style="color:#00007F">Set</SPAN> MyMenu = <SPAN style="color:#00007F">Nothing</SPAN>
    <SPAN style="color:#00007F">Set</SPAN> TB = <SPAN style="color:#00007F">Nothing</SPAN>
<SPAN style="color:#00007F">End</SPAN> <SPAN style="color:#00007F">Sub</SPAN>
</FONT>
 

ishi

Board Regular
Joined
Apr 3, 2003
Messages
126
thanks tommygun, but i think i have what i am looking for. When you go to view-toolbars-customize and create a new one then under command the middle tab you can select New Menu at the bottom and this way i can have different sections under a menu. Hope this makes sense.

Although i guess the referencing will be different.

ishi
 

Watch MrExcel Video

Forum statistics

Threads
1,102,369
Messages
5,486,450
Members
407,547
Latest member
Sankarasrinivas

This Week's Hot Topics

Top