Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Help Clear Function
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. |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Help Clear Function
Sub Demo()
with Worksheets("Sheet8") .Range("A2,B9:B15,C12,A13,F1:F10").ClearContents End with End Sub Assign the macro to your button for Sheet8 -- regards, Tom Ogilvy "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. |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
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. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
how can i clear a perticular range using a function...??? | Excel Discussion (Misc queries) | |||
clear the clear the web page email attachment lines | Excel Discussion (Misc queries) | |||
Function to clear data | Excel Discussion (Misc queries) | |||
Clear Cell If Function = 0 | Excel Worksheet Functions | |||
How Do I Install a Reset or Clear Function | Excel Worksheet Functions |