copy macro assigned buttons in an array

G

Guest

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.
 
G

Guest

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top