How To Make An InputBox In VBA

The input box is a great way to retrieve and process input
from your user.

In the following example we’ll control program flow based on the
user’s input in the inputbox.

Your user will enter a text value and we will evaluate their answer
and send them in the right direction.

Sub InputboxVBA()
    Dim strAnswer As String
    
    strAnswer = InputBox("What is the password?", "Enter Password")
    
    Select Case strAnswer
        
        Case "P@ssword"
            MsgBox "Correct!  You can now use the program."
            
        Case Else
            
            MsgBox "Your password entry was incorrect"
            
    End Select
End Sub

 

Let me know if you have any questions on how to make this  InputBox in VBA

Offsite Related Information:

“Go Fund Me” Page


($5 suggested amount)

(…10% of your gift amount will go to charity)

Free! Subscribe To Our YouTube Channel!

Free MS Access VBA Programming Course

Facebooktwitterredditpinterestlinkedinmailby feather