Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
I want to add a button to a cell wich will clear data in a range of cells.
example: click on cell A1 and it will clear data from cell b1 thru b12. Is this possible? |
#2
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
From the forms toolbox put a button on your sheet and when the popup window
comes up click on new macro and add the following code. Range("B1:B12").Select Selection.ClearContents Mike "traveye" wrote: I want to add a button to a cell wich will clear data in a range of cells. example: click on cell A1 and it will clear data from cell b1 thru b12. Is this possible? |
#3
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
right click sheet tabview codeinsert this. Now when you DOUBLE click cel
a1 b1:b12 cleared Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, Cancel As Boolean) If Target.Address = "$A$1" Then Range("b1:b12").ClearContents End Sub However, I suspect you did NOT fully state your problem. -- Don Guillett SalesAid Software "traveye" wrote in message ... I want to add a button to a cell wich will clear data in a range of cells. example: click on cell A1 and it will clear data from cell b1 thru b12. Is this possible? |
#4
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Thanks, it works great!
"Mike" wrote: From the forms toolbox put a button on your sheet and when the popup window comes up click on new macro and add the following code. Range("B1:B12").Select Selection.ClearContents Mike "traveye" wrote: I want to add a button to a cell wich will clear data in a range of cells. example: click on cell A1 and it will clear data from cell b1 thru b12. Is this possible? |
#5
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
How Can I do that for multiple cells that are not contiguous. I am a novice.
-- dow "Mike" wrote: From the forms toolbox put a button on your sheet and when the popup window comes up click on new macro and add the following code. Range("B1:B12").Select Selection.ClearContents Mike "traveye" wrote: I want to add a button to a cell wich will clear data in a range of cells. example: click on cell A1 and it will clear data from cell b1 thru b12. Is this possible? |
#6
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
range("b1:b2,C17:d99,g13,z:z,105:105").clearconten ts
You don't need to select a range to clear it. dow wrote: How Can I do that for multiple cells that are not contiguous. I am a novice. -- dow "Mike" wrote: From the forms toolbox put a button on your sheet and when the popup window comes up click on new macro and add the following code. Range("B1:B12").Select Selection.ClearContents Mike "traveye" wrote: I want to add a button to a cell wich will clear data in a range of cells. example: click on cell A1 and it will clear data from cell b1 thru b12. Is this possible? -- Dave Peterson |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Can a cell refer to a Range of cells? | Excel Discussion (Misc queries) | |||
How do I total range of cells that have checks in checkboxes? | Excel Discussion (Misc queries) | |||
UDF is updateing cells on another sheet with count from current sheet. | Excel Discussion (Misc queries) | |||
Copy/Paste how to avoid the copy of formula cells w/o calc values | Excel Discussion (Misc queries) | |||
copying cell names | Excel Discussion (Misc queries) |