Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default application.onkey doesn't work within a cell

Hi,

I've set Application.OnKey "{F12}", "" in my workbook's open method.

It disables the F12 key fine, until I double-click a cell to edit
directly in a cell. F12 becomes functional at that point.

Any suggestions on disabling a key whilst directly editing a cell?

Thanks.

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,290
Default application.onkey doesn't work within a cell

I never knew that about OnKey.

Brute force usually works.<g
In the sheet module, add this code and no editing in any
cell is possible (i think)...

Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, Cancel As Boolean)
Cancel = True
MsgBox "Please use the formula bar to edit this cell. ", , "Aggravating Isn't It"
End Sub

-or-
In Tools | Options | Edit (tab)...
uncheck "Edit directly in cell"

-or-
use this code with OnKey code when you open the workbook...
Application.EditDirectlyInCell = False
--
Jim Cone
San Francisco, USA
http://www.realezsites.com/bus/primitivesoftware




wrote in message
Hi,
I've set Application.OnKey "{F12}", "" in my workbook's open method.
It disables the F12 key fine, until I double-click a cell to edit
directly in a cell. F12 becomes functional at that point.
Any suggestions on disabling a key whilst directly editing a cell?
Thanks.

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
How to apply Application.OnKey dewanna Excel Programming 1 April 7th 06 07:16 AM
Application.OnKey Norman Jones Excel Programming 0 January 27th 05 01:26 AM
Application.OnKey problem R Avery Excel Programming 0 July 8th 04 06:38 PM
application.onkey doesn't work bob Excel Programming 2 May 10th 04 11:06 AM
Application.OnKey problem Phillip Reeves[_2_] Excel Programming 1 January 23rd 04 06:46 PM


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