LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 22
Default InputBox Cancel Button

How do I trap a CANCEL without explicitly using a variable? I am using
some code to have the user select a cell with the mouse in conjunction
with the InputBox function and want to exit the sub if the user hits
cancel.

Here is the relevant code.

Set Location = Application.InputBox(Prompt:= _
"Using your mouse, select a payee to delete.",
Title:="SELECT PAYEE TO DELETE", Type:=8)
PayeeAddress =
Location.Address
Range(PayeeAddress).Select
ActiveCell.EntireRow.Delete Shift:=xlUp

Thanks guys!
 
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
Cancel button on messagebox/inputbox Greg[_33_] Excel Programming 1 November 9th 06 04:31 AM
InputBox - cancel button Greg Billinge Excel Programming 4 October 11th 04 06:45 PM
Help with inputbox (Distinguish OK from Cancel) NooK[_47_] Excel Programming 3 August 5th 04 11:45 AM
Inputbox and cancel button Uddinj1 Excel Programming 5 March 2nd 04 11:27 AM
Cancel button in Inputbox method MiRa Excel Programming 2 November 14th 03 01:04 PM


All times are GMT +1. The time now is 01:47 PM.

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

About Us

"It's about Microsoft Excel"