> I have a protected worksheet that I am populating with data from a VFP program. I get an error message saying that the cells that I am populating are readonly, which is the way it should be. Is the only way to populate the spreadsheet to unprotect the spreadsheet, populate the cells and then protect it again? Is there a different way around this?
Jim, Yes. Unprotect the sheet, do your modifications and then protect it again.
oExcel = CREATEOBJECT("Excel.Application")
oSheet = oExcel.ActiveSheet
oSheet.Unprotect("MyPassword")
oActiveSheet.Protect("MyPassword", .T., .T., .T.)