I am using the following procedure within my excel project:
when I use this procedure it creates the require result from a display perspective.
my dilema is as each button is running the same macro ie "CHANGE", how do I force the
"CHANGE" procedure to only work on the row selected
Code:
Public Sub ADDBUTTONS(ASheet)
Dim BILLCOUNT As Integer
Dim INCOMECOUNT As Integer
BILLCOUNT = Worksheets("BILLS").Range("D1") 'HOLDS VALUE 19
INCOMECOUNT = Worksheets("INCOME").Range("H1") 'HOLDS VALUE 7
Worksheets(ASheet).Range("A1").Select
ADDBUTTONCOUNT = 5 + BILLCOUNT
ActiveCell.Offset(ADDBUTTONCOUNT, 1).Select
For COUNTER = 0 To INCOMECOUNT - 1
Selection.Copy
ActiveSheet.Pictures.Paste.Select
ActiveCell.Value = "CHANGE"
ActiveCell.HorizontalAlignment = xlCenter
ActiveCell.Font.Bold = True
Selection.OnAction = "CHANGE"
ActiveCell.Offset(1, 0).Select
Next COUNTER
End Sub
my dilema is as each button is running the same macro ie "CHANGE", how do I force the
"CHANGE" procedure to only work on the row selected