Hi Folks,
Hi,
I am not sure on what you refer to with setting a comment for a range? If it is setting a comment of r range of cells, a comment is always attached to a single cell. What you can do is to loop in the range and add the same comment for each cell, but I am not sure this is what you want to do.
If the idea is to add a comment to a named range, yes, you can do that and APIMate should show you how. Code like this should work:
TXlsNamedRange nm = new TXlsNamedRange("MyName", 0, 1, 1, 1, 10, 10, 0);
nm.Comment = "my comment";
xls.SetNamedRange(nm);
Thanks Adrian!
Ah, ok. Sadly a comment is attached to a single cell in Excel, there is no way to add a comment for a column. But what if you just disable the ShowInputBox but enable ShowErrorBox? This way if the user enters a valid value there won't be any disruption, but if he tries to enter an invalid value, you can show him a dialog telling him the valid values and the reason it is invalid. Seems like the best solution for your case.
Hi Adrian,
Hi,
This is weird, we didn't change anything in the code for protected cells. Can you email me the files before and after modification to adrian@tmssoftware.com ? Or any simple app that shows the problem so we can investigate it.
Done.
Hi,
Thanks for the files, I got them. But as commented via direct mail, both files are identical excpept for the data validation input box, and neither allow me to modify values here, as the cells are locked.
I've sent you an email with more information. But can you try unlocking the cells where you want the user to be able to edit values?
As discussed, this was a false alarm due to my use of the wrong FlexCel assembly.