LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 553
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Error dialog box meaning and how to find error Jeanne Excel Worksheet Functions 2 September 4th 08 04:59 AM
Excel 2002: Need to know the meaning of error meesage Mr. Low Excel Discussion (Misc queries) 11 January 25th 08 02:36 AM
On error goto problem Coppercrutch Excel Discussion (Misc queries) 3 December 28th 07 03:04 PM
On Error GoTo Doesn't Work [email protected] Excel Discussion (Misc queries) 2 November 29th 07 09:43 PM
On Error GoTo skip needs help dan Excel Discussion (Misc queries) 2 April 24th 06 06:29 PM


All times are GMT +1. The time now is 07:31 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"