Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Cell D8 is formated as a number cell and unprotected.
How can I make ZERO ("0") the default value of this cell? Even if the user hits the delete button a ZERO needs to be re-inserted. Thanks in advance for your assistance. Rick |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
You can create the following procedu
Sub NeverBlank() Dim wb As Workbook Dim ws As Worksheet Dim varVal As Variant Set wb = ActiveWorkbook Set ws = wb.ActiveSheet varVal = Range("A1").Value If Len(varVal) = 0 Then Range("A1").Value = 0 End If Set wb = Nothing Set ws = Nothing End Sub And then invoke it from by running it from the Worksheets change event. -- Kevin Backmann "Rick_C" wrote: Cell D8 is formated as a number cell and unprotected. How can I make ZERO ("0") the default value of this cell? Even if the user hits the delete button a ZERO needs to be re-inserted. Thanks in advance for your assistance. Rick |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
default number of copies | Excel Discussion (Misc queries) | |||
Default Number | Excel Worksheet Functions | |||
Default number format | Excel Discussion (Misc queries) | |||
default number format | Excel Discussion (Misc queries) | |||
Default number of worksheets | Excel Programming |