Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7
Default keypress interception

Hello everybody!
I need to make available some graphical object for movement on a protected
sheet. So I've protected that sheet in this way:
Foglio.Protect DrawingObjects:=False,
but i need to control the risk of object deletion...maybe "undoing" the
deletion action.
The idea I've in mind is to intercept the DEL keydown once it has been
hitten in order to restore the deleted object...but I don't know how.
Who can help me!?
Thanks in advance
--
Sergiovery (IT)

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,058
Default keypress interception

See OnKey Method in VBA Help
--
Gary''s Student - gsnu200752
  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7
Default keypress interception

Simply perfect...it was so easy, but I didn't know anythink about OnKey! meny
Thanks
--
Sergiovery



"Gary''s Student" wrote:

See OnKey Method in VBA Help
--
Gary''s Student - gsnu200752

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 10,593
Default keypress interception


Add this macro

Sub myProc()
MsgBox "Delete key disabled"
End Sub

then redirect the delete key with

Application.OnKey "{DEL}", "myProc"


You can use

Application.OnKey "{DEL}"

to reset it

--
HTH

Bob

(there's no email, no snail mail, but somewhere should be gmail in my addy)

"Sergiovery" wrote in message
...
Hello everybody!
I need to make available some graphical object for movement on a protected
sheet. So I've protected that sheet in this way:
Foglio.Protect DrawingObjects:=False,
but i need to control the risk of object deletion...maybe "undoing" the
deletion action.
The idea I've in mind is to intercept the DEL keydown once it has been
hitten in order to restore the deleted object...but I don't know how.
Who can help me!?
Thanks in advance
--
Sergiovery (IT)



Reply
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
line delete interception [email protected] Excel Programming 5 March 6th 06 03:50 PM
keypress Luis Excel Programming 0 January 3rd 06 03:01 PM
Keypress broogle Excel Programming 7 July 7th 05 05:20 AM
KeyPress Events Daniel F Excel Programming 0 June 30th 04 04:44 PM
keypress Garry Jones Excel Programming 2 October 17th 03 09:47 AM


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