Using the Do...Until Loop : Do Until « Language Basics « VBA / Excel / Access / Word






Using the Do...Until Loop

 
   Sub AskForPassword3() 
       Dim pWord As String 

       pWord = "" 
       Do Until pWord = "DADA" 
           pWord = InputBox("What is the Report password?") 
       Loop 
   End Sub 

 








Related examples in the same category

1.Do Loop Until
2.Exit Do Until Loop
3.Using the Do...Until Loop with a Condition at the Bottom of the Loop
4.Use Do Until with if statement