Office Interop - Populating Checkboxes
-
Does anyone know what needs to be done to programmatically check or uncheck a checkbox in Excel using C# (or even VB.Net)? I already have the code to open an excel document, change cells, update links, save, and close, but the checkboxes are killin me. I have tried using the Worksheet.CheckBoxes(object Index) method to try and retrieve a CheckBox object, but it doesn't work. It returns an obscure COM error. I tried it by using both the checkbox name and a number for the Index parameter. When attempting to generate a macro in excel to change the value of the checkbox, no code is generated when performing actions to the object. I don't want to have the checkbox link to a cell, and change the cell to control the checkbox -- that is lame. But if no one can find a solution, I may have to do it that way. ----------------------- I pity the foo. -Mr. T