Help Clear Function
Sub ClearCells()
Dim cell As Range
With ActiveSheet
For Each cell In .UsedRange
If Not cell.Locked Then
cell.ClearContents
End If
Next cell
End With
End Sub
--
HTH
RP
(remove nothere from the email address if mailing direct)
"Ed" wrote in message
...
Hv a Excel file with 3 sheets for calculation of various charges..On each
sheet, most of the cells are protected against changes because of built-in
functions and formulas. A minority of these cells are NOT protected as
they
require users' input. Since these sheets are re-used often, is there
anyway
to write a VBA string for a button option to clear these entries everytime
Excel starts up? The button should ideally work for each sheet only. Any
help would be appreciated. Thanks in adv.
Ed.
|