Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How to protect a column in a worksheet programmatically
Message
De
09/04/2003 04:34:56
Cetin Basoz
Engineerica Inc.
Izmir, Turquie
 
 
À
08/04/2003 17:58:43
Information générale
Forum:
Visual FoxPro
Catégorie:
COM/DCOM et OLE Automation
Divers
Thread ID:
00775265
Message ID:
00775375
Vues:
12
>Hi All,
>
>This is what I want to do
>
>1. Append data from a dbf table to an empty Excel work sheet
>2. Do some formatting on the work sheet. ( Font bold , Calculating etc.)
>3. Make the 3rd column (Column C ) Protected/Read only so user can not change any data in this column.
>
>Within my VFP program I was able to open Excel application object and do step 1 and 2. But I’m stuck with the 3rd one. I just don’t know how to make just one column protected after appending the data from dbf table.
>
>Please Help !!!
>
>TIA
>
>- Jeana -
Use orders
lcXLS = Sys(5)+Curdir()+'orders.xls'
Copy To (lcXLS) Type Xls
oExcel = Createobject('Excel.application')
With oExcel
  .Workbooks.Open(lcXLS)
  With .ActiveWorkbook.ActiveSheet
    .UsedRange.Locked = .F.
    .Range('C:C').Locked = .T. && 3rd column locked
    .Protect
  Endwith
  .Visible = .T.
Endwith
Cetin
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform