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


> > > 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 ?
> >
> >
> > thanks...its work....but how about password to protect....? can we add to it ?
>
> Probably this:
> oExcel.ActiveSheet.Protect ("PASSWORD")
> See details in the VBA for Excel Help on protect method (in Excel, ALT+F11, Help)

oke....thanks alot mr. yuri

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