Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Is it possible to make a button clear certain cells. i want a button that
will clear F6:G22 and K6:K17 i am not to sure how to put together the code. could someone please give me an example? thankyou |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
View Toolbars Forms
click on the button icon and put a button on the worksheet. When the Assign Macro dialog box appears, select new and enter: Sub Button1_Click() Range("F6:G22", "K6:K17").Clear End Sub -- Gary''s Student - gsnu200770 "YMC" wrote: Is it possible to make a button clear certain cells. i want a button that will clear F6:G22 and K6:K17 i am not to sure how to put together the code. could someone please give me an example? thankyou |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() Sub Button1_Click() Range("F6:G22", "K6:K17").Clear End Sub the only problem with this is that it completely clears everything. i just want it to clear the information in the cells, and leave the color and formats |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
use
Range("F6:G22", "K6:K17").ClearContents instead of Range("F6:G22", "K6:K17").Clear -- Gary''s Student - gsnu200770 "YMC" wrote: Sub Button1_Click() Range("F6:G22", "K6:K17").Clear End Sub the only problem with this is that it completely clears everything. i just want it to clear the information in the cells, and leave the color and formats |
#5
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() "Gary''s Student" wrote: use Range("F6:G22", "K6:K17").ClearContents instead of Range("F6:G22", "K6:K17").Clear that works great accept it is clearing everything in between H-J column. just want what i specified in F, G, and K cloumn i just want the specified cells to clear |
#6
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Activesheet.Range("F6:G22,K6:K17").ClearContents
(I like to qualify my ranges, too.) YMC wrote: "Gary''s Student" wrote: use Range("F6:G22", "K6:K17").ClearContents instead of Range("F6:G22", "K6:K17").Clear that works great accept it is clearing everything in between H-J column. just want what i specified in F, G, and K cloumn i just want the specified cells to clear -- Dave Peterson |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Clear button | Excel Discussion (Misc queries) | |||
Create a Clear button to clear unprotected cells | Excel Programming | |||
excel clear button | Excel Worksheet Functions | |||
clear button | Excel Discussion (Misc queries) | |||
Clear Button | Excel Discussion (Misc queries) |