Msgbox ponctuel
Résolu
arthur11
-
arthur11 -
arthur11 -
Bonjour,
Je souhaiterais afficher un msgbox à l'ouverture d'un fichier Excel tous les lundis et aucun autre jour.
Comment est-ce possible ?
Merci par avance =)
Je souhaiterais afficher un msgbox à l'ouverture d'un fichier Excel tous les lundis et aucun autre jour.
Comment est-ce possible ?
Merci par avance =)
1 réponse
Bonjour,
A mettre dans ThisWorkbook :
pour en savoir plus:
http://boisgontierjacques.free.fr/pages_site/FonctionsDates.htm
@+ Le Pivert
A mettre dans ThisWorkbook :
Option Explicit Private Sub Workbook_Open() Dim madate As Date Dim jour As Integer jour = Weekday(madate, vbMonday) MsgBox jour If jour = 6 Then 'a adapter le jour pour le lundi MsgBox "Jeudi" End If End Sub
pour en savoir plus:
http://boisgontierjacques.free.fr/pages_site/FonctionsDates.htm
@+ Le Pivert
Au final j'ai trouvé un moyen via la macro
Sub Auto_Open
et j'ai intégré ma macro dedans...