Share via

VBS scripting, loop until

Anonymous
2018-09-30T15:57:40+00:00

can someone explain to me, why when put the loop until answer=true all the codes under this stop working ?

Microsoft 365 and Office | PowerPoint | For home | Windows

Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.

0 comments No comments

8 answers

Sort by: Most helpful
  1. Anonymous
    2018-09-30T18:45:39+00:00

    now it's not working at all, haha

    Was this answer helpful?

    2 people found this answer helpful.
    0 comments No comments
  2. Anonymous
    2018-09-30T17:11:23+00:00

    error code 800A03F3 expected '=' line 2 character 25

    Was this answer helpful?

    0 comments No comments
  3. Anonymous
    2018-09-30T17:01:56+00:00

    As a general rule

    Declare Variables

    Never use reserved words (like Password) as variable

    Does this do what you need?

    Sub TestPW()

    Const strPass As String = "bp"

    Dim strInput As String

    Do

    strInput = InputBox("Enter PW")

    If Not strInput = strPass Then MsgBox "Try again"

    Loop Until strInput = strPass

    MsgBox "Correct"

    'rest of code

    End Sub

    Was this answer helpful?

    0 comments No comments
  4. Anonymous
    2018-09-30T16:20:29+00:00

    msgbox"Βάλε τον κωδικό πρόσβασης για να συνεχίσεις!"

    password = "bp"

    do

    ask=inputbox ("Κωδικός Πρόσβασης:                                                                                                                       Made By Nektarios!")

    select case ask

    case password

    answer=true

    x=msgbox("Κωδικός δεκτός!")

    wscript.quit

    end select

    answer=false

    x=msgbox("Προσπάθησε ξανά!")

    Loop until answer=true

    WScript.Sleep 2000

    x=msgbox("Τέλεια, τώρα έχεις πρόσβαση!")

    Was this answer helpful?

    0 comments No comments
  5. Anonymous
    2018-09-30T16:17:56+00:00

    You really need to post at least the relevant part of your code.

    Was this answer helpful?

    0 comments No comments