Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2
Default Disable the Delete Key

Is there a way to disable the use of the delete key or change it so that when
it is pressed, it displays a zero?

I am using the Essbase Add-in and if a blank field is submitted, it does not
replace the prior values in the field. I need to make sure that there are no
blank cells if there are, I need to replace them with zeros.

Any help would be appreciated.
--
Thank you,
Carol
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1,316
Default Disable the Delete Key

This won't disable the delete key, but it will let you pre-populate the cells
with a 0.

Select the entire data range and press the F5 key. In the dialog box, click
the SPECIAL command button in the lower left-hand corner and then click the
BLANKS option button and click the OK command button to return to the
workbook.

Type a 0 (zero) and then press <Ctrl + <Enter to enter the value in all
selected cells.

Hope this helps...
--
Kevin Backmann


"CarolK1968" wrote:

Is there a way to disable the use of the delete key or change it so that when
it is pressed, it displays a zero?

I am using the Essbase Add-in and if a blank field is submitted, it does not
replace the prior values in the field. I need to make sure that there are no
blank cells if there are, I need to replace them with zeros.

Any help would be appreciated.
--
Thank you,
Carol

  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2
Default Disable the Delete Key

I already have the cells pre-populated with zeros and/or the values
previously entered. I have conditional formating to show if the cell is
blank.

Thank you for the suggestion.
--
Carol


"Kevin B" wrote:

This won't disable the delete key, but it will let you pre-populate the cells
with a 0.

Select the entire data range and press the F5 key. In the dialog box, click
the SPECIAL command button in the lower left-hand corner and then click the
BLANKS option button and click the OK command button to return to the
workbook.

Type a 0 (zero) and then press <Ctrl + <Enter to enter the value in all
selected cells.

Hope this helps...
--
Kevin Backmann


"CarolK1968" wrote:

Is there a way to disable the use of the delete key or change it so that when
it is pressed, it displays a zero?

I am using the Essbase Add-in and if a blank field is submitted, it does not
replace the prior values in the field. I need to make sure that there are no
blank cells if there are, I need to replace them with zeros.

Any help would be appreciated.
--
Thank you,
Carol

  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 22,906
Default Disable the Delete Key

This sheet event code will replace a deleted item with a 0

Can you use that?

Private Sub Worksheet_Change(ByVal Target As Excel.Range)
If Target.Count 1 Then Exit Sub
If Not IsNumeric(Target.Value) Then Exit Sub
Application.EnableEvents = False
With Target
If .Value = "" Then
.Value = 0
End If
End With
Application.EnableEvents = True
End Sub

This is sheet event code. Right-click on the sheet tab and "View Code".

Copy/paste the code into that module.


Gord Dibben MS Excel MVP


On Wed, 30 Jan 2008 08:16:06 -0800, CarolK1968
wrote:

I already have the cells pre-populated with zeros and/or the values
previously entered. I have conditional formating to show if the cell is
blank.

Thank you for the suggestion.


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
Disable Delete Kevin Excel Discussion (Misc queries) 0 July 29th 07 02:58 PM
How to Delete a Range in Closed Workbook (to Replace Delete Query) [email protected] Excel Discussion (Misc queries) 1 March 8th 06 10:10 AM
VBA to disable "Delete...." on shortcut menu of worksheet tab? Mary Kathryn Excel Discussion (Misc queries) 3 March 3rd 06 05:54 PM
Confirm Delete Message Disable RiosPapa New Users to Excel 2 October 7th 05 09:02 PM
How to delete rows when List toolbar's "delete" isnt highlighted? Linda Excel Worksheet Functions 1 May 26th 05 08:39 PM


All times are GMT +1. The time now is 01:31 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"