Hello,
I have an application that is written in VB.net 2005 and interacts with MS Excel 2002 on a Windows XP SP3 machine. My app opens an excel spreadsheet, sends data to specific cells, saves and closes the spreadsheet. My business customer asked that one of the cells (named zipcode) be "disabled" so that the user cannot change the data in that cell. I figured I could protect the cell since the sheet is also password protected and still be able to send the zipcode to the cell. This is the error that I get when I try to do that:
"The cell or chart you are trying to change is protected and therefore read-only.
To modify a protected cell or chart, first remove protection using the Unprotect Sheet command (Tools menu, Protection submenu). You may be prompted for a password."
This makes sense to me, but I was looking to find a way to unprotect the cell, send the data, and then protect it again. Is there any way to do that? I haven't been able to find much help on the internet.
Thanks!
I have an application that is written in VB.net 2005 and interacts with MS Excel 2002 on a Windows XP SP3 machine. My app opens an excel spreadsheet, sends data to specific cells, saves and closes the spreadsheet. My business customer asked that one of the cells (named zipcode) be "disabled" so that the user cannot change the data in that cell. I figured I could protect the cell since the sheet is also password protected and still be able to send the zipcode to the cell. This is the error that I get when I try to do that:
"The cell or chart you are trying to change is protected and therefore read-only.
To modify a protected cell or chart, first remove protection using the Unprotect Sheet command (Tools menu, Protection submenu). You may be prompted for a password."
This makes sense to me, but I was looking to find a way to unprotect the cell, send the data, and then protect it again. Is there any way to do that? I haven't been able to find much help on the internet.
Thanks!