ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   Resetting cells (https://www.excelbanter.com/excel-worksheet-functions/170003-resetting-cells.html)

Chuck

Resetting cells
 
I want to create a Command Button that when pressed will set the value of
cell D10, for example, to the value in C10. I suspect there's an easy
solution, but not yet found it in the VBA book I have. Thanks.

Luke M

Resetting cells
 
Enter this in your VBA module.

Sub ChangeValue()
Range("D10").value = Range("C10").value

End Sub

Then create a command button, and assign it the ChangeValue macro.
--
Best Regards,

Luke M


"Chuck" wrote:

I want to create a Command Button that when pressed will set the value of
cell D10, for example, to the value in C10. I suspect there's an easy
solution, but not yet found it in the VBA book I have. Thanks.



All times are GMT +1. The time now is 02:27 AM.

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