Dim t# 'mémorisation
Private Sub Workbook_Activate()
Application.OnTime 1, "ThisWorkbook.AfficheShapes"
End Sub
Private Sub Workbook_Deactivate()
On Error Resume Next
Application.OnTime t, "ThisWorkbook.AfficheShapes", , False
End Sub
Sub AfficheShapes()
Dim s As Shape
On Error Resume Next
For Each s In ActiveSheet.Shapes
s.Visible = Not (s.TopLeftCell.Rows.Hidden Or s.TopLeftCell.Columns.Hidden)
Next
t = Now + 1 / 86400
Application.OnTime t, "ThisWorkbook.AfficheShapes"
End Sub