Welcome To The Home Of The Visual FoxPro Experts  
home. signup. forum. archives. search. google. articles. downloads. faq. members. weblogs. file info. rss.
 From: Yuri Rubinov
  Where is Yuri Rubinov?
 Philadelphia
 Pennsylvania - United States
 Yuri Rubinov
 To: sam roy
  Where is sam roy?
 samarinda
 Indonesia
 sam roy
 Tags
Subject: RE: auto protect cell
Thread ID: 50934 Message ID: 50970 # Views: 1 # Ratings: 0
Version: Visual FoxPro 8 Category: Microsoft Office Automation
Date: Tuesday, September 07, 2004 2:11:28 PM         
   


If you can do it in Excel, then you can do automation. The common advice is to record a macro in Excel, and translate the VB code to VFP.
Something like this:
oExcel=CREATEOBJECT("Excel.Application")
oExcel.Workbooks.Add
oExcel.Visible=.t.
oExcel.Range("D3").locked=.f.
oExcel.Range("D2").locked=.t. &&lock for input
oExcel.ActiveSheet.Protect &&otherwise cells will be not locked
oExcel=null

>
> Could we make autoprotect cell in Excel automation so data could not edited ?


ENTIRE THREAD

auto protect cell Posted by sam roy @ 9/7/2004 9:42:14 AM
RE: auto protect cell Posted by Yuri Rubinov @ 9/7/2004 2:11:28 PM
RE: auto protect cell Posted by sam roy @ 9/8/2004 7:48:48 AM
RE: auto protect cell Posted by Yuri Rubinov @ 9/8/2004 3:59:38 PM
RE: auto protect cell Posted by sam roy @ 9/9/2004 4:43:22 AM