Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
create commandbar / control button using codes
dear frank/all,
i found the below from this forum. its great and almost meet my needs. 1)first time, excel will create the toolbar and button but the next time when i use the application, error comes out. how to ask excel not to create as the toolbar and button already created? 2) how to change the smiley button to others using code? if all are the same user will confuse. 3) how to name/put description to the button using code? 4) i put the following in a button. only authorised user allowed to use the customised button created from the below. this will not affect unauthorised personnel, rite? as i put this application in the server. rgds Sub create_toolbar() Dim but1, but2, foundbut As Variant Set foundbut = Application.CommandBars.FindControl _ (Type:=msoControlCustom, Tag:="Tender Toolbar") If foundbut Is Nothing Then Application.CommandBars.Add(Name:="Tender Toolbar").Visible = True Set but1 = Application.CommandBars("Tender Toolbar").Controls.Add(Type:=msoControlButton, ID:=2950, _ befo=1) Set but2 = Application.CommandBars("Tender Toolbar").Controls.Add(Type:=msoControlButton, ID:=2950, _ befo=2) but1.OnAction = "Doing action" but2.OnAction = "Doing action" End If End Sub |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
How to create control button on worksheet: Forms v. ActiveX feature? | Excel Discussion (Misc queries) | |||
create a control button to insert rows | Excel Discussion (Misc queries) | |||
How do I create a button or control that will automatically go to | Excel Worksheet Functions | |||
commandbar control and application.caller | Excel Programming | |||
Add control to commandbar | Excel Programming |