Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Excel Invalid Parameter
Message
 
To
27/04/2013 17:50:41
General information
Forum:
Visual FoxPro
Category:
COM/DCOM and OLE Automation
Environment versions
Visual FoxPro:
VFP 8 SP1
Miscellaneous
Thread ID:
01572078
Message ID:
01572108
Views:
35
>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
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform