Hello, Everyone. In my Test.xlsm Excel workbook.
thisworkbook code is :
sub workbook_open()
the module code is :
sub a()
sub b()
Now, here is my question,when sub b is not running, if you press {ESC}, this workbook will be closed normally.
but when sub b is running, if you press {ESC}, Excel doesn't responding.
WHY? Can someone here help me, Thank you !!!
thisworkbook code is :
sub workbook_open()
Application.OnKey "{ESC}", "a"
end subthe module code is :
sub a()
thisworkbook.close savechanges:=fasle
end subsub b()
for i=1 to 1048576
sheet1.cells(i,1)=i
doevents
next
end subNow, here is my question,when sub b is not running, if you press {ESC}, this workbook will be closed normally.
but when sub b is running, if you press {ESC}, Excel doesn't responding.
WHY? Can someone here help me, Thank you !!!