r/vbscript • u/_Nay__ • Jun 18 '20
Is there anyway to store user input?
I want to make a script that can store the answer from an input box.
Option Explicit
Dim password
password = InputBox("Please Verify with your 4 digit code." , "Verification:" , "Code Here")
if password = "USERINPUT" Then
msgbox "Verification Completed"
Else
msgbox "Incorrect Verification Code"
End If
I would want to put whatever the user enters in another input box to auto update where it says USERINPUT, is there any way to do this?
2
Upvotes
1
u/[deleted] Jul 07 '20
The code you wrote is functional. What it says is this:
Basically, you would want to change string "USERINPUT" to the expected password OR you could simply change the code to check whether or not the user entered anything instead:
1
u/Thefakewhitefang Aug 13 '20
My answer is wrong you can only do it in excel VBA