thanks a ton peter... thanks for your help!
"Peter T" wrote:
I don't know the C# syntax but in VB/A -
Dim ole as Excel.OLEObject
With xlApp.ActiveCell
Set ole = xlApp.ActiveSheet.OLEObjects.Add("Forms.CommandBut ton.1", _
Left:=.Left, Top:=.Top, Width:=115#, Height:=24#)
End With
ole.Visible = True
' trap the button's events in a WithEvents class
Set c = New clsBtnEvents
Set c.btn = ole.Object
Regards,
Peter T
"NA_AB" wrote in message
...
how to generate the command button on the active cell?!?!