onkey CTRL+Break

J

john philippen

When i press CTRL + BREAK a msg comes on the screen.
I made this by onkey event.

however
it doesnt work when i press CTRL + BREAK on a USerform.
how can i fix it.
 
H

Héctor Miguel

hi, john !
When i press CTRL + BREAK a msg comes on the screen.
I made this by onkey event.

however
it doesnt work when i press CTRL + BREAK on a USerform.
how can i fix it.

ask in the on-line help [vba] for the application.enablecancelkey method

hth,
hector.
 
J

john philippen

hector,

thnx, but it doesn't work

John


Héctor Miguel said:
hi, john !
When i press CTRL + BREAK a msg comes on the screen.
I made this by onkey event.

however
it doesnt work when i press CTRL + BREAK on a USerform.
how can i fix it.

ask in the on-line help [vba] for the application.enablecancelkey method

hth,
hector.
 
H

Héctor Miguel

hi, john !
thnx, but it doesn't work

this way it's working for me... [w/in the show userform procedure]...

Sub ShowMyUserform()
Application.EnableCancelKey = xlErrorHandler
On Error GoTo Check_Error
UserForm1.Show
Check_Error:
If Err = 18 Then Resume
End Sub

if any doubt or further informacion, would you please comment ?

hth,
hector.

__ previously on this thread __
hi, john !
When i press CTRL + BREAK a msg comes on the screen.
I made this by onkey event.

however
it doesnt work when i press CTRL + BREAK on a USerform.
how can i fix it.

ask in the on-line help [vba] for the application.enablecancelkey method

hth,
hector.
 
J

john philippen

Thnx
it works


Héctor Miguel said:
hi, john !
thnx, but it doesn't work

this way it's working for me... [w/in the show userform procedure]...

Sub ShowMyUserform()
Application.EnableCancelKey = xlErrorHandler
On Error GoTo Check_Error
UserForm1.Show
Check_Error:
If Err = 18 Then Resume
End Sub

if any doubt or further informacion, would you please comment ?

hth,
hector.

__ previously on this thread __
hi, john !
When i press CTRL + BREAK a msg comes on the screen.
I made this by onkey event.

however
it doesnt work when i press CTRL + BREAK on a USerform.
how can i fix it.

ask in the on-line help [vba] for the application.enablecancelkey method

hth,
hector.
 
Top