Private Sub CommandButton1_MouseMove(ByVal Button As Integer, ByVal Shift As Integer, ByVal X As Single, ByVal Y As Single)
mise_a_0
Me.Cells(Int(Y / 14) + 5, Int(X / 60) + 2).Interior.ColorIndex = 3 + Shift
End Sub
Private Sub CommandButton1_Mousedown(ByVal Button As Integer, ByVal Shift As Integer, ByVal X As Single, ByVal Y As Single)
CommandButton2.Activate
Application.ScreenUpdating = False
'on selectionne
Me.Cells(Int(Y / 14) + 5, Int(X / 60) + 2).Select
If Shift = 0 Then
' pas de SHIFT, on suit le lien hypertexte
On Error GoTo gesterr
Selection.Hyperlinks(1).Follow NewWindow:=False, AddHistory:=True
End If
Exit Sub
gesterr:
MsgBox ("Cette cellule n'est pas liée")
CommandButton2.Activate
End Sub
Sub mise_a_0()
Me.Range(Cells(5, 2), Cells(13, 11)).Interior.ColorIndex = 2
End Sub