Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
a command button problem
Range r = Connect.myApplication.ActiveCell;
Microsoft.Office.Interop.Excel.Worksheet sht = (Microsoft.Office.Interop.Excel.Worksheet)Connect. myApplication.ActiveSheet; Microsoft.Office.Interop.Excel.Shape btn = sht.Shapes.AddOLEObject("Forms.CommandButton.1", Missing.Value,Missing.Value, Missing.Value, Missing.Value, Missing.Value, Missing.Value, sht.get_Range(r, r).Left,sht.get_Range(r, r).Top, sht.get_Range(r,r).Width, sht.get_Range(r, r).Height); ((MSForms.CommandButtonClass)btn.OLEFormat.Object) .Caption = "click_me"; Why is this not working?? How to get an event handler for this button!? |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
a command button problem
See your earlier thread with same question
Regards, Peter T "NA_AB" wrote in message ... Range r = Connect.myApplication.ActiveCell; Microsoft.Office.Interop.Excel.Worksheet sht = (Microsoft.Office.Interop.Excel.Worksheet)Connect. myApplication.ActiveSheet; Microsoft.Office.Interop.Excel.Shape btn = sht.Shapes.AddOLEObject("Forms.CommandButton.1", Missing.Value,Missing.Value, Missing.Value, Missing.Value, Missing.Value, Missing.Value, sht.get_Range(r, r).Left,sht.get_Range(r, r).Top, sht.get_Range(r,r).Width, sht.get_Range(r, r).Height); ((MSForms.CommandButtonClass)btn.OLEFormat.Object) .Caption = "click_me"; Why is this not working?? How to get an event handler for this button!? |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Command Button Problem | Excel Discussion (Misc queries) | |||
Problem with command button name | Excel Discussion (Misc queries) | |||
strange command button problem | Excel Discussion (Misc queries) | |||
Command Button Visibility Problem | Excel Programming | |||
Command Button Problem | Excel Programming |