ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   How do i clear a cell using a command button? (https://www.excelbanter.com/excel-discussion-misc-queries/80626-how-do-i-clear-cell-using-command-button.html)

Mariann

How do i clear a cell using a command button?
 
I need to know how to clear a cell using a command button. I can get it as
far as N/A but is there any way to stop the N/A showing?

kassie

How do i clear a cell using a command button?
 
I don't know where oyu get the N/A from? Create a command button, right
click on it, select View Code, and enter the following: Range(<your range
eg"A1").ClearContents. Close the VBA editor, click on the Design icon, (the
one with the pencil, triangle and ruler), and click on the button. It will
clear the contents of the cell. I did not deal with naming the button etc
though.

"Mariann" wrote:

I need to know how to clear a cell using a command button. I can get it as
far as N/A but is there any way to stop the N/A showing?



All times are GMT +1. The time now is 01:20 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com