LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #4   Report Post  
Kryptonix
 
Posts: n/a
Default Prompt Before Cell Deletion


Hiya,

Just an update, I have done some investigation and have come up with
the following code which seems to do what I want.

Sub proDangerousProcedure()

YesNo = MsgBox("Are you sure you wish to delete this data?", vbYesNo +
vbCritical, "Warning!!!!")
Select Case YesNo
Case vbYes
Macro1
Case vbNo
Exit Sub
End Select

End Sub


When I run a Macro I created the message pops up and if I say yes it
delete's the data and if it doesn't it leaves it.

This is great, my only problem now is how to get the macro to run when
I press the delete key on the keyboard? is this possible? At the
moment it works if I press a button I created on the toolbar but would
like it to activate it by pressing the delete key also.

Any elp would be gratefully appreciated :)

Thanks

Kevin


--
Kryptonix
------------------------------------------------------------------------
Kryptonix's Profile: http://www.excelforum.com/member.php...o&userid=28108
View this thread: http://www.excelforum.com/showthread...hreadid=476187

 
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
Cell color based upon cell value My View Excel Discussion (Misc queries) 11 July 6th 05 03:59 AM
cell color index comparison MINAL ZUNKE New Users to Excel 1 June 30th 05 07:11 AM
Cell Change Color - Need Help alani New Users to Excel 3 June 29th 05 03:50 PM
#REF! after cell deletion Colin G Eastwood Excel Discussion (Misc queries) 1 December 2nd 04 01:22 PM
VLookup resulting in a blank cell... KempensBoerke Excel Worksheet Functions 1 October 28th 04 09:57 PM


All times are GMT +1. The time now is 08:28 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"