Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, Cancel As Boolean)
Target.FormulaR1C1 = Val_Ecriture
End Sub
Private Sub Worksheet_Activate()
With Application.CommandBars("Cell").Controls.Add(Type:=msoControlButton, Before:=1)
.OnAction = "Ecrit"
.FaceId = 31
.Caption = "Ecriture"
End With
Application.CommandBars("Cell").Controls(2).BeginGroup = True
End Sub
Private Sub Worksheet_Deactivate()...
Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Cells.Count > 1 Then Exit Sub
If Target = "" Then Exit Sub
Application.EnableEvents = False
Target = [D3] & Target
Application.EnableEvents = True
End Sub
Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, Cancel As Boolean)
Target.FormulaR1C1 = Val_Ecriture
End Sub
Private Sub Worksheet_Activate()
With Application.CommandBars("Cell").Controls.Add(Type:=msoControlButton, Before:=1)
.OnAction = "Ecrit"
.FaceId = 31
.Caption = "Ecriture"
End With
Application.CommandBars("Cell").Controls(2).BeginGroup = True
End Sub
Private Sub Worksheet_Deactivate()
Application.CommandBars("Cell").Reset
End Sub
Public Const Val_Ecriture = "Il faut écrire "
Sub Ecrit()
'
' Macro3 Macro
'
' Touche de raccourci du clavier: Ctrl+q
'
ActiveCell.FormulaR1C1 = Val_Ecriture
End Sub
Private Sub Workbook_Open()
With Application.CommandBars("Cell").Controls.Add(Type:=msoControlButton, Before:=1)
.OnAction = "Ecrit"
.FaceId = 31
.Caption = "Ecriture"
End With
Application.CommandBars("Cell").Controls(2).BeginGroup = True
End Sub
Private Sub Workbook_SheetActivate(ByVal Sh As Object)
With Application.CommandBars("Cell").Controls.Add(Type:=msoControlButton, Before:=1)
.OnAction = "Ecrit"
.FaceId = 31
.Caption = "Ecriture"
End With
Application.CommandBars("Cell").Controls(2).BeginGroup = True
End Sub
Private Sub Workbook_SheetBeforeDoubleClick(ByVal Sh As Object, ByVal Target As Range, Cancel As Boolean)
Target.FormulaR1C1 = Val_Ecriture
End Sub
Private Sub Workbook_SheetDeactivate(ByVal Sh As Object)
Application.CommandBars("Cell").Reset
End Sub
Private Sub Workbook_BeforeClose(Cancel As Boolean)
Application.CommandBars("Cell").Reset
End Sub