Hi everyone,
I've got this piece of VBA that seems to do what i want:
-------
Sub CreateFormsButton()
Dim btn As Button
Dim rng As Range
With Worksheets("hdcore1")
Set rng = .Range("h4")
Set btn = .Buttons.Add(rng.Left, rng.Top, rng.Width, rng.Height)
With btn
.Caption = "Coaching"
.OnAction = "email sent"
End With
End With
End Sub
----------
It creates a button on the h4 cells with a "fit to cell size", can i modify this code to have this button create not only on h4, but i want this button to be on cell h4 to h1000. So i need to modify this code to do some sort of copy paste on multiple cell.
If i modify the range to h4;h1000, it will create 1 cell the size of my request, but i need 1000 buttons in 1 code.
Any help on how to loop or modify a quantity?
thanks!
Bookmarks