custom toolbar options

ishi

Board Regular
Joined
Apr 3, 2003
Messages
126
I have created my own toolbar and just placed it at the top. What i would like to do is have this hidden or disabled on open of workbook. Also i have a login form that loads on open of the workbook and when the users enter their logins (not set up yet) depening who they are can have certain buttons enabled on my toolbar. After the login process have the toolbar unhidden.

Any help much appreciated.

Thanks,

ishi
 
I'll stick with excel for a while. Enough confusion here but thanks to you guys life is somewhat less painful :)

ishi
 
Upvote 0

Excel Facts

Shade all formula cells
To shade all formula cells: Home, Find & Select, Formulas to select all formulas. Then apply a light fill color.
just another question is it possible to change the background colour of the custom toolbars from the rather boring grey.

Thanks,

ishi
 
Upvote 0
Don't have that here, or I would check, but I don't think you can do that with 2000 either.
 
Upvote 0
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
 
Upvote 0
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>
 
Upvote 0
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
 
Upvote 0

Forum statistics

Threads
1,213,482
Messages
6,113,913
Members
448,532
Latest member
9Kimo3

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top