Home |
Search |
Today's Posts |
#4
![]() |
|||
|
|||
![]() 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 |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Cell color based upon cell value | Excel Discussion (Misc queries) | |||
cell color index comparison | New Users to Excel | |||
Cell Change Color - Need Help | New Users to Excel | |||
#REF! after cell deletion | Excel Discussion (Misc queries) | |||
VLookup resulting in a blank cell... | Excel Worksheet Functions |