To make sure that the user has chosen the OK button, check that the input box hasn't returned a zero-length string : InputBox « Language Basics « VBA / Excel / Access / Word
To make sure that the user has chosen the OK button, check that the input box hasn't returned a zero-length string
Sub res() Dim strWhichOffice
strWhichOffice = InputBox("Enter the name of the office:", _
"Expense Assistant 2000", "default", , , _
"c:\Help.chm", 0) If strWhichOffice = "" Then End End Sub