
-----------------------------------
pavol
Thu Mar 16, 2006 5:56 pm

input box
-----------------------------------
simple question:
is there any way to know if the Cancel button was clicked on an input box?
this is why i wanna know
pass = InputBox ("Please type in your new Password", "Password")
If (the Cancel button was clicked) Then
    (don't change the password)
End If
simple but it's driving me crazy :evil:

-----------------------------------
cool dude
Thu Mar 16, 2006 7:38 pm


-----------------------------------
this is a little example program i made for u. if u need further help just post!  :) 


Dim password As String
Private Sub Form_Load()
password = InputBox("Please type in your new Password", "Password")
If password = "" Then
MsgBox "The password is the same"
Else
MsgBox "The password is " & password
End If
End Sub


Hope this helps  :)

-----------------------------------
pavol
Thu Mar 16, 2006 8:05 pm


-----------------------------------
thanks :D , i knew there was a simple solution
i just thought that when cancel was pressed and something was written in the input box then the thing that was written in there still gets stored in the variable (for some strange reason)
