Copy a form.checkbox or a form.button to a new sheet

Hello Support,

I was wondering if its possible to copy the forms element (added by the forms toolbar) to a new worksheet.

If not , is it possible to get the value of the form.checkbox. If its checked for example and get the name of the checkbox.

If not, will this be implemented in future releases ?

Thanks a lot.

Regards,

L. Getz

Yes. You can copy the forms element to a new worksheet.

Following is the sample code:

Excel excel = new Excel();
excel.Open("d:\\test\\book1.xls");
excel.Worksheets.AddCopy(0); //copy the first worksheet which contains forms elements
excel.Save("d:\\test\\book2.xls");

Hi Laurence,

Thank you very much for your reply. I forgot to mention why I would like to copy these elements Its because the worksheet is write protected, and these cant be opened on a PDA. (Pocket Office). So I want to create a fresh copy of the worksheet. The Copy Worksheet method will also copy this write protection. So im using the copy cells or copy row-column, but then I need to copy the form.checkboxes manually.

Regards,

Leo G.

Hi Leo,

You can only copy a whole worksheet including form elements. You cannot manually copy them one by one.