Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.misc
|
|||
|
|||
Meaning of On Error Goto 0
Would one of you please explain the following code to me step by step?
Sub test() Dim x As Range On Error Resume Next Set x = Application.InputBox("Select the cells.", Type:=8) If Err.Number < 0 Then MsgBox ("You Cancelled The Operation.") Exit Sub On Error GoTo 0 End If MsgBox (x.Address) End Sub All I want to do is create an inputbox which ONLY upon hitting the Cancel Button would display the msgbox "You Cancelled The Operation." and not on any other error. All your help and expert advice shall be obliged. Thanx in advance. |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Error dialog box meaning and how to find error | Excel Worksheet Functions | |||
Excel 2002: Need to know the meaning of error meesage | Excel Discussion (Misc queries) | |||
On error goto problem | Excel Discussion (Misc queries) | |||
On Error GoTo Doesn't Work | Excel Discussion (Misc queries) | |||
On Error GoTo skip needs help | Excel Discussion (Misc queries) |