Try this: Put the code at the bottom in the ThisWorkbook object of your
VBA workbook. Then, in the macro that you've programmed, put in an if
statement that says:
If blnStop < True Then
<do whatever it was doing
Else
Exit Sub
End If
Please let me know if you have problems with this.
Mark
Dim blnStop As Boolean
Private Sub Workbook_Open()
blnStop = False
Application.OnKey "{ESC}", "StopMacro"
End Sub
Sub StopMacro()
blnStop = False
End Sub
---
Mark Bigelow
mjbigelow at hotmail dot com
http://hm.imperialoiltx.com
*** Sent via Developersdex
http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!