command buttons in worksheet
Posted by Jay on June 08, 2001 10:08 PM
I need to add several command buttons (about 35) to a spreadsheet. I am using following VB code to add the buttons, which works fine except it's very slow.
Does anyone has any idea how i could do this in a more efficient way?
For i = 1 To 30
Set objBtn = lWorkSheet.OLEObjects.Add"Forms.CommandButton.1", _
Top:=lWorkSheet.Cells(lStartingRow, 1).Top + 1, _
Height:=lWorkSheet.Cells(lStartingRow, 1).Height - 1, _
Width:=lbtnWidth - 1)