View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
david fixemer david fixemer is offline
external usenet poster
 
Posts: 4
Default Question regarding an activex control button

Slim,

Used my VBA recorder to generate the following code:

ActiveSheet.OLEObjects.Add
ClassType:="Forms.CommandButton.1", Link:=False _
, DisplayAsIcon:=False, Left:=171, Top:=51.75,
Width:=46.5, Height:= _
22.5).Select
With Selection
.Placement = xlMoveAndSize
.PrintObject = True
End With


The key line is:

selection.placement = xlMoveAndSize

David Fixemer