Placing commadbutton

  • Thread starter Thread starter rumkus
  • Start date Start date
R

rumkus

How can I place a commandbutton just after column D as top = 0 by
vba ?
Any suggestion ? Tanks in advance.
 
Something like this will put a combobox over E1 (adjacent to D1):

Option Explicit
Sub testme()

Dim wks As Worksheet
Dim myCell As Range
Dim myCombo As OLEObject

Set wks = Worksheets("sheet1")
Set myCell = wks.Range("e1")

With myCell
Set myCombo = wks.OLEObjects.Add(ClassType:="Forms.ComboBox.1", _
Link:=False, _
DisplayAsIcon:=False, _
Left:=.Left, _
Top:=.Top, _
Width:=.Width, _
Height:=.Height)
End With

End Sub
 
Back
Top