Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Excel automation - Unable to set properties
Message
De
05/03/2005 13:55:08
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivie
 
 
À
05/03/2005 12:02:05
Information générale
Forum:
Visual FoxPro
Catégorie:
COM/DCOM et OLE Automation
Versions des environnements
Visual FoxPro:
VFP 6 SP5
OS:
Windows XP SP2
Database:
MS SQL Server
Divers
Thread ID:
00993022
Message ID:
00993034
Vues:
13
Might the worksheet in question be protected or something?

>Have a strange problem. A few of our clients can't set the first 10 properties below. Excel comes back with an error that says, "Unable to set the LeftHeader property" then the same thing for each of the next 10. I can run the EXACT same code on several different versions of Excel with no problems. Any ideas?
>
>WITH oXLS.Application.ActiveSheet.PageSetup
> .LeftHeader = tSheetName
> .CenterFooter = "&P of &N"
> .RightFooter = "&D - &T"
> .LeftMargin = cnCentimetersToPoints * 1.9
> .RightMargin = cnInchesToPoints * 0.27244094488189
> .TopMargin = cnInchesToPoints * 0.47244094488189
> .BottomMargin = cnInchesToPoints * 0.47244094488189
> .HeaderMargin = cnInchesToPoints * 0.236220472440945
> .FooterMargin = cnInchesToPoints * 0.236220472440945
> .Orientation = xlLandscape
> .Zoom = .f.
> .FitToPagesWide = 1
> .FitToPagesTall = .f.
> .PrintTitleRows = "$1:$1" && repeats header on each page
>ENDWITH
Difference in opinions hath cost many millions of lives: for instance, whether flesh be bread, or bread be flesh; whether whistling be a vice or a virtue; whether it be better to kiss a post, or throw it into the fire... (from Gulliver's Travels)
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform