VBA Excel gerer les dates

Résolu/Fermé
ludovanof - 27 avril 2009 à 07:58
 ludovanof - 27 avril 2009 à 16:21
Bonjour,

j'ai un soucis, j'ai besoin d'aide!!

voila j'affiche dans une textbox la date du jour (textbox1.value=datevalue(now))
je cherche a activer un bouton si l'année de cette date est 2009

If DateValue(Now) > 1 / 1 / 2009 And DateValue(Now) < 31/ 12 / 2009 Then
UserForm1.Frame12.OptionButton32.Value = True
End If

et le bouton 33 si c'est 2010 ect..

et ça marche pas

merci de votre aide precieuse
A voir également:

2 réponses

merci,

C impec
1
michel_m Messages postés 16603 Date d'inscription lundi 12 septembre 2005 Statut Contributeur Dernière intervention 16 décembre 2023 3 303
27 avril 2009 à 08:20
Bonjour
je ne vois pas le rapport avec textbox mais...

if YEAR(date)=2009 then
--

Cordialement, Michel
0
merci, c impec
0