Programmatically adding checkbox and attaching event handlers

G

guest

Hello. I need programmatically add CheckBox to the worksheet and then attach
event handlers using C#. Any ideas? I am using Microsoft.Office.Interop.Excel
library to do that. Unfortunately I have to use only interop library to do
that. Any help would be appreaciated.

thanks.
 
S

SteveM

Hello. I need programmatically add CheckBox to the worksheet and then attach
event handlers using C#. Any ideas? I am using Microsoft.Office.Interop.Excel
library to do that. Unfortunately I have to use only interop library to do
that. Any help would be appreaciated.

thanks.

Better to just create the checkbox with its code and toggle .Visible
True/False.

SteveM
 
D

Dave Peterson

Chip Pearson shares some VBA techniques for writing code that writes code.
http://www.cpearson.com/excel/vbe.aspx

Have you thought of creating a template workbook that's set up exactly the way
you want, then using that in your code to create the worksheet.

You could even use a hidden worksheet as your template--or an external workbook
if you wanted.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top