Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Excel
Message
From
03/12/2002 23:53:00
Cindy Winegarden
Duke University Medical Center
Durham, North Carolina, United States
 
 
To
03/12/2002 10:02:22
Jim Rieck
Quicken Loans/Rock Financial/Title Sourc
Livonia, Michigan, United States
General information
Forum:
Visual FoxPro
Category:
COM/DCOM and OLE Automation
Title:
Re: Excel
Miscellaneous
Thread ID:
00728989
Message ID:
00729260
Views:
12
> 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")
*!* Do stuff here
oActiveSheet.Protect("MyPassword", .T., .T., .T.)
Previous
Reply
Map
View

Click here to load this message in the networking platform