0
我想强制我的用户输入一个值或按取消。输入框有人按确定没有输入任何东西
这里是我目前的代码,但我无法找到如何在没有输入任何内容的情况下使用按下的OK按钮。
感谢
InputBox:
On Error GoTo Cancel
var_TauxUS = InputBox("Veuillez aller sur www.xe.com et entrer le taux d'echange US/CAN:" & vbCrLf & vbCrLf & "Exemple: 1,26 (avec une virgule)", "TAUX US") 'La variable reçoit la valeur entrée dans l'InputBox
If StrPtr(var_TauxUS) = 0 Then
GoTo InputBox
ElseIf var_TauxUS <= 1 Then
MsgBox "Vous devez entrer un chiffre plus grand que 1"
GoTo InputBox
ElseIf var_TauxUS >= 1.35 Then
MsgBox "Vous devez entrer un chiffre plus petit que 1.36"
GoTo InputBox
Else
var_TauxUS = var_TauxUS + vECHANGEDEVISE 'Calculer l'échange de la devise
var_US = True
MsgBox "Nous commenceons a updater les prix à un taux de " & var_TauxUS & " - Merci!"
GoTo Programme
End If
我想:
IsEmpty(var_TauxUS)
If var_TauxUS = "" then
和它不工作