vbscript输入框确保非空值
如何确保在InputBox中输入非空字符串值。在输入此值之前,控件不应转到下一个语句vbscript输入框确保非空值,vbscript,Vbscript,如何确保在InputBox中输入非空字符串值。在输入此值之前,控件不应转到下一个语句 fileName=InputBox("Enter File Name", "File Name") InputBox在按下“确定”时返回用户输入的字符串,在按下“取消”时返回“空”值 为用户提供取消程序的选项是必要的,因此您需要对此进行检查 Do fileName = InputBox("Enter File Name", "File Name") If IsEmpty(fileName) T
fileName=InputBox("Enter File Name", "File Name")
InputBox
在按下“确定”时返回用户输入的字符串,在按下“取消”时返回“空”值
为用户提供取消程序的选项是必要的,因此您需要对此进行检查
Do
fileName = InputBox("Enter File Name", "File Name")
If IsEmpty(fileName) Then
WScript.Quit ' Cancel has been pressed!
End If
fileName = Trim(fileName)
Loop Until fileName > ""
MsgBox "You entered " & filename
InputBox
在按下“确定”时返回用户输入的字符串,在按下“取消”时返回“空”值
为用户提供取消程序的选项是必要的,因此您需要对此进行检查
Do
fileName = InputBox("Enter File Name", "File Name")
If IsEmpty(fileName) Then
WScript.Quit ' Cancel has been pressed!
End If
fileName = Trim(fileName)
Loop Until fileName > ""
MsgBox "You entered " & filename