OVH Cloud OVH Cloud

est pair en vba

4 réponses
Avatar
Thierry K
Bonjour à toutes et à tous
en vba, comment dire estpair?

if xx="estpair" then .......end if

xx étant un nombre de 60 à 0


Office Pro 2003
Win XP Pro SP2

Merci d'avance pour vos conseils

pour répondre, enlever w x y z

Thierry K

4 réponses

Avatar
Jean-François Aubert
Salut Thierry,

Sub Pair

Dim Toto As Double
Toto = 24.25

If Int(Toto) Mod 2 = 0 Then
MsgBox Int(Toto) & " est une valeur pair"
End If
End Sub


--
Amicalement

Jean-François Aubert
{Vaudois de la Côte Lémanique}


"Thierry K" a écrit dans le message de news:
444343b4$0$21304$
Bonjour à toutes et à tous
en vba, comment dire estpair?

if xx="estpair" then .......end if

xx étant un nombre de 60 à 0


Office Pro 2003
Win XP Pro SP2

Merci d'avance pour vos conseils

pour répondre, enlever w x y z

Thierry K



Avatar
MonOnc'
bonjour Thierry,

If xx Mod 2 = 0 Then
MsgBox xx & " est pair"
Else
MsgBox xx & " est impair"

End If

cordialement

Thierry K a formulé la demande :
Bonjour à toutes et à tous
en vba, comment dire estpair?

if xx="estpair" then .......end if

xx étant un nombre de 60 à 0


Office Pro 2003
Win XP Pro SP2

Merci d'avance pour vos conseils

pour répondre, enlever w x y z

Thierry K


Avatar
JLuc
*Bonjour Thierry K*,
Je crois :
If (xx MOD 2) = 0 Then Msgbox "Pair"

Bonjour à toutes et à tous
en vba, comment dire estpair?

if xx="estpair" then .......end if

xx étant un nombre de 60 à 0


Office Pro 2003
Win XP Pro SP2

Merci d'avance pour vos conseils

pour répondre, enlever w x y z

Thierry K


--
____
( O | O )
--
_oooO_ JLuc _Oooo_

O-O

Avatar
Thierry K
Merci à vous tous pour votre aide


Thierry K