copy macro assigned buttons in an array
I would like to assign a macro to a button to add 14 days to a date in a cell
in the same row. But the catch is I would like to have 5000 rows with 5000 buttons only update the cell in it's row. Any help would be greatly appreciated. |
You might want to try a Worksheet_SelectionChange event. This one will add
14 to what ever is in column b and place it in column c when you click a cell in column a. You could use formating in colmn a to simulate buttons Private Sub Worksheet_SelectionChange(ByVal Target As Range) If Target.Column = 1 And Target.Count = 1 Then Target.Offset(0, 2) = Target.Offset(0, 1) + 14 End If End Sub "Phatboy_D" wrote: I would like to assign a macro to a button to add 14 days to a date in a cell in the same row. But the catch is I would like to have 5000 rows with 5000 buttons only update the cell in it's row. Any help would be greatly appreciated. |
All times are GMT +1. The time now is 07:19 AM. |
Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com