'コマンドバー上に、マクロボタンを作る。
'このツールバーは、エクセル終了と同時に消える。
Sub Morecbar_add()
CommandBars.Add Name:="HART MOREC", Position:=msoBarTop, temporary:=True
CommandBars("HART MOREC").Visible = True
End Sub
Sub MorecMenuVisible()
Dim Instmenu, instmenu2
Set Instmenu = CommandBars("HART MOREC").Controls.Add(Type:=msoControlButton)
Instmenu.Caption = "START"
With Instmenu
.OnAction = "START" ' sub start()のマクロを実行する。
.BeginGroup = True
.Caption = "スタート"
.Style = msoButtonCaption
End With
Set instmenu2 = CommandBars("HART MOREC").Controls.Add(Type:=msoControlButton)
instmenu2.Caption = "hozon"
With instmenu2
.OnAction = "hozon"
.BeginGroup = True
.Caption = "保存"
.Style = msoButtonCaption
End With
End Sub