Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Excel Invalid Parameter
Message
 
À
27/04/2013 17:50:41
Information générale
Forum:
Visual FoxPro
Catégorie:
COM/DCOM et OLE Automation
Versions des environnements
Visual FoxPro:
VFP 8 SP1
Divers
Thread ID:
01572078
Message ID:
01572108
Vues:
34
>In a program that has been working successfully for a long time we are suddenly getting an error message from the following line of code
>
>oXL.Application.WorkBooks.Open(lcFile)
>oXL.Cells.Select
>oXL.Selection.autofilter
>oSelection = oXL.Selection
>oSelection.FormatConditions.Add(2,[=],[=MOD($G1,2)])
>
>The last line errors with the following message
>
>MessageOLE error code 0x80070057: The parameter is incorrect.
>
>We are using Excel 2003
>
>I tried substituting the value for xlEqual instead of the equal sign but got the same message
>
>Can anybody shed some light on what might be causing this and what corrective action I can take?
>
>Thanks to all...........Rich


I do not know all the details of your excel file. So, as a shot in the dark, try:
oXL.Selection.FormatConditions.Delete
oXL.Selection.FormatConditions.Add(2,[=],[=MOD($G1,2)])
Good Luck
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform