LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Disabeling key


Hi!
I would like to disable the DELETE key whenever a particular sheet is
selected and then reenable it whenever any other sheet is selected.
I have this code in the VBA sheet I want it disabled in.

[start code]
Private Sub disable1()
' This macro disables the Delete key
Application.OnKey "{DELETE}", ""
End Sub
[end code]

If I use this code on all the other sheets it should reenable the key.

[start code]
Private Sub disable2()
' This macro enables the Delete key
Application.OnKey "{DELETE}"
End Sub
[end code]

It does'nt work. What am I doing wrong?
I would be greatfull for any help. Thanks!!


--
Brian Matlack
------------------------------------------------------------------------
Brian Matlack's Profile: http://www.excelforum.com/member.php...fo&userid=3508
View this thread: http://www.excelforum.com/showthread...hreadid=502533

 
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
Disabeling Hyperlinks Nathalie Krochmann Links and Linking in Excel 10 June 8th 08 08:41 PM
ShowDataForm disabeling a field rony Excel Programming 0 October 27th 04 12:31 PM


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