Bonjour la communauté
je souhait savoir comment faire un test si la feuille ("GESTION DIVERS") est visible dans ma macro
Sub PREV( )
Dim c As Range
Application.ScreenUpdating = False
With Sheets("GESTION DIVERS")
For Each c In .Range(.[APl10], .[APl65536].End(xlUp))
If c.Value < DateSerial(Year(Date), Month(Date) + 3, Day(Date)) Then
If txt = "" Then txt = "Attention préavis fin de validitée(s):" & vbCrLf
txt = txt & c.Offset(, -2) & " " & c.Offset(, -1) & vbCrLf
End If
Next c
If txt <> "" Then MsgBox txt
End With
Application.ScreenUpdating = True
End Sub
merci
je souhait savoir comment faire un test si la feuille ("GESTION DIVERS") est visible dans ma macro
Sub PREV( )
Dim c As Range
Application.ScreenUpdating = False
With Sheets("GESTION DIVERS")
For Each c In .Range(.[APl10], .[APl65536].End(xlUp))
If c.Value < DateSerial(Year(Date), Month(Date) + 3, Day(Date)) Then
If txt = "" Then txt = "Attention préavis fin de validitée(s):" & vbCrLf
txt = txt & c.Offset(, -2) & " " & c.Offset(, -1) & vbCrLf
End If
Next c
If txt <> "" Then MsgBox txt
End With
Application.ScreenUpdating = True
End Sub
merci