Je suis persuadé que ce lien t'aidera : http://dj.joss.free.fr/faq.htm
Et en tout premier lieu cette page : http://dj.joss.free.fr/netiquet.htm
-- Cordialement, P. Bastard
je n'ai pas encore trouvé comment mettre un bouton de commande dans la barre d'outil et lui affecter une macro?
c'est simple mais j'ai égaré mon gros bouquin
eddy a+
ChrisV
Bonjour Eddy,
Avec par ex, un bouton supplémentaire créé sur la BO Standard... Dans la feuille de code de ThisWorkbook
Private Sub Workbook_Open() CreateMyBO End Sub
Private Sub Workbook_BeforeClose(Cancel As Boolean) DeleteMyBO End Sub
Private Sub Workbook_WindowActivate(ByVal Wn As Window) On Error Resume Next Application.CommandBars("Standard") _ .Controls("Informations").Visible = True End Sub
Private Sub Workbook_WindowDeactivate(ByVal Wn As Window) On Error Resume Next Application.CommandBars("Standard") _ .Controls("Informations").Visible = False End Sub
Dans un module du classeur:
Sub CreateMyBO() Set myBO = CommandBars("Standard").Controls.Add With myBO .Caption = "Informations" .FaceId = 487 .OnAction = "zaza" End With End Sub
Sub DeleteMyBO() On Error Resume Next Application.CommandBars("Standard") _ .Controls("Informations").Delete End Sub
Sub zaza() MsgBox "A bientôt sur MPFE" End Sub
ChrisV
"Eddy Maue" <eddymaue@@hotmail.com> a écrit dans le message de news:
je n'ai pas encore trouvé comment mettre un bouton de commande dans la barre d'outil et lui affecter une macro?
c'est simple mais j'ai égaré mon gros bouquin
eddy a+
-- Ceci est une signature automatique de MesNews. Site : http://www.mesnews.net
Bonjour Eddy,
Avec par ex, un bouton supplémentaire créé sur la BO Standard...
Dans la feuille de code de ThisWorkbook
Private Sub Workbook_Open()
CreateMyBO
End Sub
Private Sub Workbook_BeforeClose(Cancel As Boolean)
DeleteMyBO
End Sub
Private Sub Workbook_WindowActivate(ByVal Wn As Window)
On Error Resume Next
Application.CommandBars("Standard") _
.Controls("Informations").Visible = True
End Sub
Private Sub Workbook_WindowDeactivate(ByVal Wn As Window)
On Error Resume Next
Application.CommandBars("Standard") _
.Controls("Informations").Visible = False
End Sub
Dans un module du classeur:
Sub CreateMyBO()
Set myBO = CommandBars("Standard").Controls.Add
With myBO
.Caption = "Informations"
.FaceId = 487
.OnAction = "zaza"
End With
End Sub
Sub DeleteMyBO()
On Error Resume Next
Application.CommandBars("Standard") _
.Controls("Informations").Delete
End Sub
Sub zaza()
MsgBox "A bientôt sur MPFE"
End Sub
ChrisV
"Eddy Maue" <eddymaue@@hotmail.com> a écrit dans le message de news:
mn.cb777d5b0b655851.43997@hotmail.com...
je n'ai pas encore trouvé comment mettre un bouton de commande dans la
barre d'outil et lui affecter une macro?
c'est simple mais j'ai égaré mon gros bouquin
eddy a+
--
Ceci est une signature automatique de MesNews.
Site : http://www.mesnews.net
Avec par ex, un bouton supplémentaire créé sur la BO Standard... Dans la feuille de code de ThisWorkbook
Private Sub Workbook_Open() CreateMyBO End Sub
Private Sub Workbook_BeforeClose(Cancel As Boolean) DeleteMyBO End Sub
Private Sub Workbook_WindowActivate(ByVal Wn As Window) On Error Resume Next Application.CommandBars("Standard") _ .Controls("Informations").Visible = True End Sub
Private Sub Workbook_WindowDeactivate(ByVal Wn As Window) On Error Resume Next Application.CommandBars("Standard") _ .Controls("Informations").Visible = False End Sub
Dans un module du classeur:
Sub CreateMyBO() Set myBO = CommandBars("Standard").Controls.Add With myBO .Caption = "Informations" .FaceId = 487 .OnAction = "zaza" End With End Sub
Sub DeleteMyBO() On Error Resume Next Application.CommandBars("Standard") _ .Controls("Informations").Delete End Sub
Sub zaza() MsgBox "A bientôt sur MPFE" End Sub
ChrisV
"Eddy Maue" <eddymaue@@hotmail.com> a écrit dans le message de news:
je n'ai pas encore trouvé comment mettre un bouton de commande dans la barre d'outil et lui affecter une macro?
c'est simple mais j'ai égaré mon gros bouquin
eddy a+
-- Ceci est une signature automatique de MesNews. Site : http://www.mesnews.net