Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
I have finally found out how to add a button but now I am haveing a problem
on having the button clear contents in certain cells does anyone know how to do this thanks for your help I do not know any codes for this |
#2
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
I'll bet you could learn very quickly by using the macro recorder while you
select some cells and editclearcontents. Here is a sample for a button from the Control Toolbox Private Sub CommandButton1_Click() ActiveSheet.Range("certain cells").ClearContents End Sub "certain cells" would be your range of cells. Gord Dibben MS Excel MVP On Wed, 9 Dec 2009 15:30:26 -0800, Charlie wrote: I have finally found out how to add a button but now I am haveing a problem on having the button clear contents in certain cells does anyone know how to do this thanks for your help I do not know any codes for this |
#3
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
Just to add to Gord's response.
If you want to clear the contents of the current selection, you could modify the code to look like: Private Sub CommandButton1_Click() Selection.ClearContents End Sub Gord Dibben wrote: I'll bet you could learn very quickly by using the macro recorder while you select some cells and editclearcontents. Here is a sample for a button from the Control Toolbox Private Sub CommandButton1_Click() ActiveSheet.Range("certain cells").ClearContents End Sub "certain cells" would be your range of cells. Gord Dibben MS Excel MVP On Wed, 9 Dec 2009 15:30:26 -0800, Charlie wrote: I have finally found out how to add a button but now I am haveing a problem on having the button clear contents in certain cells does anyone know how to do this thanks for your help I do not know any codes for this -- Dave Peterson |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Clear Contents | Setting up and Configuration of Excel | |||
Clear Contents | Excel Discussion (Misc queries) | |||
to clear contents of a spreadsheet | Excel Discussion (Misc queries) | |||
Clear cell contents with a button | Excel Worksheet Functions | |||
Clear Contents But Not Formula | Excel Discussion (Misc queries) |