I have made a module that according to what number you enter with the conditional if, I get a message or another.
I have created a repetition with the loop do ... loop, so that I only introduce from 1 to three and if I do not ask for it again, but it does not come out of the loop, it asks me on each turn to enter the data. put 1 or 2 or 3
The variable I declare as Variant or as String and it does not matter, because the inputbox gives as a string and not as Integer.
I'm looking for information on how it's used, but I think it's like that, I do not see the problem, can you help me?
I put the code:
Sub Escalado() Dim Escalado As Variant Do While Escalado <> "1" Or "2" Or "3" MsgBox "Tienes que poner un numero del 1 al 3", vbInformation, "ENVIO CORREO PLANTILLA" Escalado = InputBox("Tipo de escalado 1, 2 o 3", "ENVIO PLANTILLA", " SOLO INTRODUCIR UN NUMERO 1 - 2 o 3") Loop If Escalado = "1" Then MsgBox "escalado n1" ElseIf Escalado = "2" Then MsgBox "escalado n2" Else MsgBox "escalado n3" End If End Sub