Sub aide() MsgBox("Ceci est l'aide du logicel" & vbCrLf & "Tapez change et appuyez sur entrée pour changer d'image" & vbCrLf & "tapez exit ou quitter puis validez par entrée pour quitter le logiciel") test: Dim choix As String choix = InputBox("choisissez une lettre comprise entre a et e", "") If choix = "a" Then GoTo test If choix = "b" Then GoTo test If choix = "c" Then GoTo test If choix = "d" Then GoTo test If choix = "e" Then End GoTo test End Sub
Sub aide() MsgBox("Ceci est l'aide du logicel" & vbCrLf & "Tapez change et appuyez sur entrée pour changer d'image" & vbCrLf & "tapez exit ou quitter puis validez par entrée pour quitter le logiciel") test: Dim choix As String choix = InputBox("choisissez une lettre comprise entre a et e", "") If choix = "a" Then GoTo test If choix = "b" Then GoTo test If choix = "c" Then GoTo test If choix = "d" Then GoTo test If choix = "e" Then End GoTo test End Sub
Sub aide() dim sortie as boolean sortie = false Do MsgBox("Ceci est l'aide du logicel" & vbCrLf & "Tapez change et appuyez sur entrée pour changer d'image" & vbCrLf & "tapez exit ou quitter puis validez par entrée pour quitter le logiciel") Dim choix As String choix = InputBox("choisissez une lettre comprise entre a et e", "") select case choix case "a" to "d" sortie = false msgbox ("Vous avez une bonne réponse, mais il faut recommencer") case "e" msgbox ("Enfin vous avez fini par trouver la bonne réponse pour sortir de ce dédale") sortie = true case else msgbox("Mauvaise réponse") sortie = false end select loop until sortie = true End Sub
Vous n’avez pas trouvé la réponse que vous recherchez ?
Posez votre question