1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34
|
Sub LancerInegrale
Dim ret as integer
If Not MaFonction1 Then
MsgBox "Erreur fonction 1"
exit sub
end if
If Not MaFonction2 Then
MsgBox "Erreur fonction 2"
exit sub
end if
'Tu peu même avoir une fonction qui renvoi un code d'erreur
ret = Fonction3
if ret <> 0 then
MsgBox "Erreur N°" & ret & " Fonction 3"
exit sub
end if
end sub
Function Mafonction1 as booelan
'... ton code
MaFonction1 = True 'Retourne OK
End function
Function Mafonction2 as booelan
'... ton code
MaFonction2 = True 'Retourne OK
End function
Function Mafonction3 as integer
'... ton code
MaFonction3 = 2 ' Retour code d'erreur 2
End function |