Re:ID boutons
Bonjour à toutes et tous.
Merci Pascal pour cette info.
J'ai des problèmes pour ajouter mon bouton 'annuler'.
Soit ma BO est imcomplète ou absente .
Mais je dois oublier quelque chose dans le code.
pourriez vous m'aider ?
Par avance merci
Tial
Sub CreateBO()
'Création de la barre d'outils 'Forme Libre'
Citron = 'Dégivré'
On Error GoTo fin
With Application
.ScreenUpdating = False
Application.CommandBars('Standard').Visible = False
Application.CommandBars('Formatting').Visible = False
.CommandBars.Add(Name:='Forme libre').Visible = True
With .CommandBars('Forme libre')
.Position = msoBarRight
.Controls.Add Type:=msoControlButton, Id:=21, Before:=1
.Controls.Add Type:=msoControlButton, Id:=22, Before:=2
.Controls.Add Type:=msoControlButton, Id:=206, Before:=1
.Controls.Add Type:=msoControlButton, Id:=200, Before:=1
.Controls.Add Type:=msoControlButton, Id:=128, Before:=1
With .Controls.Add(msoControlButton)
.OnAction = 'Feuille2'
.FaceId = 916
.Caption = 'Afficher la feuille de traitement'
End With
With .Controls.Add(msoControlButton)
.OnAction = 'Feuille1'
.FaceId = 956
.Caption = 'Afficher la feuille de rapport'
End With
With .Controls.Add(msoControlButton)
.OnAction = 'Feuille3'
.FaceId = 984
.Caption = 'Afficher la feuille d'aide'
End With
With .Controls.Add(msoControlButton)
.OnAction = 'LoupeGivre'
.FaceId = 25
.Caption = 'Zoomer l'image'
End With
With .Controls.Add(msoControlButton)
.OnAction = 'AfficherVignette'
.FaceId = 623
.Caption = 'Afficher Vignette'
End With
With .Controls.Add(msoControlButton)
.OnAction = 'Imprimer'
.FaceId = 4
.Caption = 'Imprimer le Rapport'
End With
With .Controls.Add(msoControlButton)
.OnAction = 'copiefeuille'
.FaceId = 317
.Caption = 'Transfert du rapport'
End With
With .Controls.Add(msoControlButton)
.OnAction = 'Fermer'
.FaceId = 51
.Caption = 'Quitter l'application'
End With
End With
End With
ActiveSheet.Shapes.AddShape(msoShapeRectangle, 1, 1, 1, 1). _
Select
With Selection.ShapeRange
.Fill.Visible = msoFalse
.Line.Weight = 0.5
.Line.ForeColor.SchemeColor = 48
.SetShapesDefaultProperties
End With
Selection.Delete
fin:
End Sub