Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Variable Toolbar
I want to make a variable toolbar. Sometimes there are 4 charts possible, connected to 4 buttons. Sometimes 2 or 3. Here my code For iCH = 1 To numCHARTS onAct = "MAKEchart" & iCH '??????? how to do this ?????? '??Set MyButtonCHART & iCH ?? = Controls.Add(Type:=msoControlButton) With MyButtonvarCHART & iCH ...??? Caption = "chart" & iCH Style = msoButtonCaption BeginGroup = True '.OnAction = onAct End With Next iCH Some help is always welcome. Thx Zurn -- Zurn ------------------------------------------------------------------------ Zurn's Profile: http://www.excelforum.com/member.php...o&userid=14645 View this thread: http://www.excelforum.com/showthread...hreadid=526740 |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Variable Toolbar
Application.CommandBars.Add Name:="MyCharts", temporary:=True
With Application.CommandBars("MyCharts") For iCH = 1 To numCHARTS With .Controls.Add(Type:=msoControlButton) .Caption = "chart" & iCH .Style = msoButtonCaption .BeginGroup = True .OnAction = "MAKEchart" & iCH End With Next iCH End With -- HTH Bob Phillips (remove nothere from email address if mailing direct) "Zurn" wrote in message ... I want to make a variable toolbar. Sometimes there are 4 charts possible, connected to 4 buttons. Sometimes 2 or 3. Here my code For iCH = 1 To numCHARTS onAct = "MAKEchart" & iCH '??????? how to do this ?????? '??Set MyButtonCHART & iCH ?? = Controls.Add(Type:=msoControlButton) With MyButtonvarCHART & iCH ...??? Caption = "chart" & iCH Style = msoButtonCaption BeginGroup = True '.OnAction = onAct End With Next iCH Some help is always welcome. Thx Zurn -- Zurn ------------------------------------------------------------------------ Zurn's Profile: http://www.excelforum.com/member.php...o&userid=14645 View this thread: http://www.excelforum.com/showthread...hreadid=526740 |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Variable Toolbar
Thx Bob, this saved me a lot of typing work... Zur -- Zur ----------------------------------------------------------------------- Zurn's Profile: http://www.excelforum.com/member.php...fo&userid=1464 View this thread: http://www.excelforum.com/showthread.php?threadid=52674 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
excel toolbar like word toolbar, please | Excel Discussion (Misc queries) | |||
Form Toolbar verses Control Toolbar | Excel Discussion (Misc queries) | |||
Adjusting toolbar size, restore toolbar | Excel Discussion (Misc queries) | |||
why is it saying sheetcnt is "variable not defined" how to do a global variable to share over multiple functions in vba for excel? | Excel Worksheet Functions | |||
saving toolbar buttons on custom toolbar | Excel Programming |