Re : Pourquoi j'ai "l'heure est stopée" en plein milieu de feuilles qui n'ont rien à
Re,
Dans le module 2 du classeur :
Dim temps
Sub majHeure()
ThisWorkbook.Sheets("pisc").[H2] = Now
temps = Now + TimeValue("00:00:1")
Application.OnTime temps, "majHeure"
End Sub
Sub auto_open2()
majHeure
Range("G3") = ""
End Sub
Sub auto_close()
On Error Resume Next
Application.OnTime temps, Procedure:="majHeure", Schedule:=False
Range("G3") = "L'heure est Stoppée"
End Sub
Sub essai()
nf = Application.GetOpenFilename("Fichiers jpg,*.jpg")
If nf = False Then Exit Sub
With ActiveCell
.ClearComments
.AddComment
.Comment.Shape.Fill.UserPicture nf
.Comment.Shape.Height = 250
.Comment.Shape.Width = 250
.Comment.Shape.ScaleHeight 1.2, msoFalse, msoScaleFromTopLeft
End With
End Sub
Option Explicit
Sub Commentaires_police_noire()
Dim c As Range
With Application: .ScreenUpdating = False: .Calculation = xlManual: .EnableEvents = False: End With
For Each c In ActiveSheet.UsedRange
If Not c.Comment Is Nothing Then
c.Comment.Shape.OLEFormat.Object.Font.ColorIndex = 1
End If
Next
With Application: .EnableEvents = True: .Calculation = xlAutomatic: .ScreenUpdating = True: End With
End Sub
à+