Home |
Search |
Today's Posts |
|
#1
![]() |
|||
|
|||
![]()
I have the following code but when the cancel button on my input box is
pressed the "invalid password" message is still displayed. Can someone help so when the cancel button is pressed then that is exactly what happens, the input box is cancelled. Dim MyStr1 As String, MyStr2 As String MyStr2 = ("engineering") MyStr1 = InputBox("Please Enter The Required Password") If MyStr1 = MyStr2 Then Sheets("Sheet2").Select Range("A9").Select Else MsgBox "Incorrect Password. Access Denied", vbCritical Range("E22").Select End If |
#2
![]() |
|||
|
|||
![]() Good afternoon Nick Enter this line immediately after the line that opens the InputBox: If MyStr1 = "" Then Exit Sub HTH DominicB -- dominicb ------------------------------------------------------------------------ dominicb's Profile: http://www.excelforum.com/member.php...o&userid=18932 View this thread: http://www.excelforum.com/showthread...hreadid=383168 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Slight problem automating Excel in a service | Setting up and Configuration of Excel | |||
Excel Display Problem | Excel Discussion (Misc queries) | |||
autofilter problem | Excel Worksheet Functions | |||
Freeze Pane problem in shared workbooks | Excel Discussion (Misc queries) | |||
Row Autofit problem Excel 2003 | Excel Discussion (Misc queries) |