Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
hey ppl n hi peter! at last, found a way out.
Range r = Connect.myApplication.ActiveCell; Microsoft.Office.Interop.Excel.Worksheet theSheet = (Microsoft.Office.Interop.Excel.Worksheet)Connect. myApplication.Worksheets.get_Item(1); theSheet.Shapes.AddOLEObject("Forms.CommandButton. 1", Missing.Value, Missing.Value, Missing.Value, Missing.Value, Missing.Value, "click_me", theSheet.get_Range(r, r).Left,theSheet.get_Range(r, r).Top, theSheet.get_Range(r, r).Width, theSheet.get_Range(r, r).Height); Requires you to add MSForms 2.0, your addin should have a reference to MSForms object library and use as MSForms.CommandButton. |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
XL2002 - Cell Reference for Active Button | Excel Programming | |||
Excel shoud not close all active books when clicking close button | Excel Discussion (Misc queries) | |||
Adding a control button to insert a date in the active cell. | Excel Discussion (Misc queries) | |||
Change active cell properties with command button | Excel Programming | |||
Change active cell properties with command button | Excel Programming |