Sub MenuBar_Create()
'Dim MiaBarra As CommandBar
'creo barra menù personalizzata per il programma
'Set MiaBarra =
Dim myCB As CommandBar
Dim myCBtn1, myCBtn2, myCBtn3 As CommandBarButton
Set myCB = CommandBars.Add("Barra Menù SGP", msoBarRight)
Set myCBtn1 = myCB.Controls.Add(msoControlButton)
With myCBtn1
.Caption = "HELP!"
.Style = msoButtonIconAndCaption
.FaceId = 124
' .OnAction = "HELP_Click()"
End With
Set myCBtn2 = myCB.Controls.Add(msoControlButton)
With myCBtn2
.Caption = "Crea in SolidEdge!"
.Style = msoButtonIconAndCaptionBelow
.FaceId = 3894
.OnAction = "SolidEdge_Interface_Activate()"
End With
Set myCBtn3 = myCB.Controls.Add(msoControlButton)
With myCBtn3
.Caption = "BACK!"
.Style = msoButtonIconAndCaption
.FaceId = 1017
.OnAction = "Attiva_Pulsanti_comando"
' .Execute
End With
myCB.Visible = True
'Call MenuBar_Show
End Sub
Public Sub Attiva_Pulsanti_comando()
Dim Myfoglio
MsgBox "fatto!!"
Application.ScreenUpdating = True
ThisWorkbook.Worksheets("MAIN").Activate
End Sub |