ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Adding checkbox to worksheet in C# (https://www.excelbanter.com/excel-programming/385122-adding-checkbox-worksheet-c.html)

Abhimanyu Sirohi

Adding checkbox to worksheet in C#
 
I am using Excel object model in C# using Office XP PIA.
I want to add a checkbox to the worksheet programmatically. In VBA I can add
a checkbox using the 'CheckBoxes' collection's Add method but there is no
such collection in PIA classes.

regards


NickHK

Adding checkbox to worksheet in C#
 
From the macro recorder::

ActiveSheet.OLEObjects.Add(ClassType:="Forms.Check Box.1", Link:=False, _
DisplayAsIcon:=False, Left:=642.75, Top:=159.75, Width:=103.5,
Height _
:=21.75).Select

NickHK

"Abhimanyu Sirohi" wrote in
message ...
I am using Excel object model in C# using Office XP PIA.
I want to add a checkbox to the worksheet programmatically. In VBA I can

add
a checkbox using the 'CheckBoxes' collection's Add method but there is no
such collection in PIA classes.

regards





All times are GMT +1. The time now is 05:22 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com