create command buttons using vba
Jeff,
Here's what I come up with by running the Macro Recorder and a little
tweaking:
Sub make_buttons()
Dim cbutton As OLEObject
Set cbutton = ActiveSheet.OLEObjects.Add(ClassType:="Forms.Comma ndButton.1",
Link:=False _
, DisplayAsIcon:=False, Left:=173.25, Top:=75.75, Width:=49.5,
Height:=33.75)
Set cbutton = ActiveSheet.OLEObjects.Add(ClassType:="Forms.Comma ndButton.1",
Link:=False _
, DisplayAsIcon:=False, Left:=258, Top:=78.75, Width:=50.25,
Height:=27.75)
End Sub
hth,
Doug
"Jeff" wrote in message
...
Please help. :-)
I need to create 'Command Buttons' to reside on a worksheet
using VBA. The number of command buttons created will vary.
The command button type is from the 'Control Tool box'
thank you
--
Jeff
|