macro to add button to a spreadsheet cell
Here is one example you can look over...
Mark Ivey
Sub AddButtonAndMacroToSheet()
' Change this selection as needed
Range("D11").Select
' This will add a button to the activecell
' which was selected in the previous step
ActiveSheet.Buttons.Add(ActiveCell.Left, _
ActiveCell.Top, _
ActiveCell.Width, _
ActiveCell.Height).Select
' This will assign a macro to this button
Selection.OnAction = "Macro1"
End Sub
|