Hello Everyone,
I'm trying to obtain a decimal number inserted by an input box, but the problem is that IDEA shrinks the number, so if I type 1.9 and store it in a variable, the value of the variable is 1 instead of 1.9. Can anyone help me with this, please?
jsandoval
Offline
Last seen: 2 years 7 months ago
Joined: 03/01/2021 - 10:48
I'm sorry I forgot to attach my script. I think the problem is related to the data type when declaring y variable. Does anyone know wich datA Type is the equivalent in IDEA to a float?
Sub Main
Dim t_cambio As Double
t_cambio = InputBox("Escriba el tipo de cambio : ", "Tipo de Cambio",0.00)
MsgBox t_cambio
End Sub
Hi jsnadoval,
Here is how you should set this up. You should also add some error checking to make sure the user doesn't enter something like "ABC" or a blank.