Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
How do I make a button to put on a tab that will clear information in
specific cells? ie I want the button to clear (delete) any information in cells I4, I9, I11. |
#2
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
One way:
If you use a button from the Forms toolbar, attach this macro to it (right-click the button and choose Assign Macro): Public Sub ClearCells Range("I4,I0,I11").ClearContents End Sub In article , Karen Smith wrote: How do I make a button to put on a tab that will clear information in specific cells? ie I want the button to clear (delete) any information in cells I4, I9, I11. |
#3
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Hi,
Click View|Toolbars|Forms to show the forms toolbar then Click the button tool on the toolbar and put a button on your worksheet In the window that pops up click NEW and paste this in Set myrange = Range("I4,I9,I11") myrange.ClearContents Mike "Karen Smith" wrote: How do I make a button to put on a tab that will clear information in specific cells? ie I want the button to clear (delete) any information in cells I4, I9, I11. |
#4
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
I sa your response to this,and I have tried it out - its brilliant. I already
have it working in a large worksheet. One question though - Having created the button from the forms toolbar,how can i attached a label to the button. eg "Clear down spredsheet",telling someone to carry out this action,before updating the worksheet. It absolutely amazes me the the knowledge out there. Regards Finance Guru "JE McGimpsey" wrote: One way: If you use a button from the Forms toolbar, attach this macro to it (right-click the button and choose Assign Macro): Public Sub ClearCells Range("I4,I0,I11").ClearContents End Sub In article , Karen Smith wrote: How do I make a button to put on a tab that will clear information in specific cells? ie I want the button to clear (delete) any information in cells I4, I9, I11. |
#5
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Right-click on the button and edit the text.
Gord Dibben MS Excel MVP On Mon, 29 Oct 2007 10:02:02 -0700, Finance Guru wrote: I sa your response to this,and I have tried it out - its brilliant. I already have it working in a large worksheet. One question though - Having created the button from the forms toolbar,how can i attached a label to the button. eg "Clear down spredsheet",telling someone to carry out this action,before updating the worksheet. It absolutely amazes me the the knowledge out there. Regards Finance Guru "JE McGimpsey" wrote: One way: If you use a button from the Forms toolbar, attach this macro to it (right-click the button and choose Assign Macro): Public Sub ClearCells Range("I4,I0,I11").ClearContents End Sub In article , Karen Smith wrote: How do I make a button to put on a tab that will clear information in specific cells? ie I want the button to clear (delete) any information in cells I4, I9, I11. |
#6
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Thank you Gord. I did try that before emailing the discussion Group,but I
have now tried it again and it works. Thanks again for help. FG "Gord Dibben" wrote: Right-click on the button and edit the text. Gord Dibben MS Excel MVP On Mon, 29 Oct 2007 10:02:02 -0700, Finance Guru wrote: I sa your response to this,and I have tried it out - its brilliant. I already have it working in a large worksheet. One question though - Having created the button from the forms toolbar,how can i attached a label to the button. eg "Clear down spredsheet",telling someone to carry out this action,before updating the worksheet. It absolutely amazes me the the knowledge out there. Regards Finance Guru "JE McGimpsey" wrote: One way: If you use a button from the Forms toolbar, attach this macro to it (right-click the button and choose Assign Macro): Public Sub ClearCells Range("I4,I0,I11").ClearContents End Sub In article , Karen Smith wrote: How do I make a button to put on a tab that will clear information in specific cells? ie I want the button to clear (delete) any information in cells I4, I9, I11. |
#7
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Hi,
This macro works great, but how can I create a single button to clear cells for multiple sheets? For example, I want to clear cells G6:G25 in sheet 1, sheet 2, and sheet 3 with just one click of a button. Please let me know when you have a chance. Thanks, Cuong EggHeadCafe - .NET Developer Portal of Choice http://www.eggheadcafe.com |
#8
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
One way:
Public Sub ClearRangeInThreeSheets() Const csCellRef As String = "G6:G25" Dim ws As Worksheet For Each ws In Worksheets(Array("Sheet 1", "Sheet 2", "Sheet 3")) ws.Range(csCellRef).ClearContents Next ws End Sub In article , Qiang Huang wrote: For example, I want to clear cells G6:G25 in sheet 1, sheet 2, and sheet 3 with just one click of a button. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Command button to clear inputs | Excel Discussion (Misc queries) | |||
Clear Button | Excel Discussion (Misc queries) | |||
create a clear button | Excel Discussion (Misc queries) | |||
Create a button to Clear Cells | Excel Discussion (Misc queries) | |||
Button to clear all entries? | Excel Worksheet Functions |