Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Operator mismatch
Message
De
24/05/2010 03:24:57
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
COM/DCOM et OLE Automation
Versions des environnements
Visual FoxPro:
VFP 9 SP2
OS:
Windows XP SP2
Network:
Windows XP
Database:
Visual FoxPro
Divers
Thread ID:
01465616
Message ID:
01465689
Vues:
45
It works but it wont evaluate the condition as it is a string,
but I tried this
VAL(TRANSFORM(oExcel.Cells[nRow, 9].Value)) <= 3.2
and intrestingly enough it worked!!


>Tamas,
>
>What I suggested should have worked regardless of the type of the cell. In other words,
transform(value) <="3.2"
>
>
>>Thanks everyone for you answers!
>>
>>I rechecked and tried the followings:
>>
>>
>>FOR nRow = 1 TO  oExcel.ActiveWorkBook.ActiveSheet.UsedRange.Rows.Count
>>    IF oExcel.Cells[nRow, 9].Value <= 3.2
>>          oExcel.Cells[nRow, 2].Interior.Color = RGB(255,153,255)
>>    ENDIF
>>ENDFOR
>>
>>didnt work, same error message.
>>
>>
>>FOR nRow = 1 TO  oExcel.ActiveWorkBook.ActiveSheet.UsedRange.Rows.Count
>>    IF oExcel.Cells[nRow, 9].Value <= "3.2"
>>          oExcel.Cells[nRow, 2].Interior.Color = RGB(255,153,255)
>>    ENDIF
>>ENDFOR
>>
>>didnt work either, same error message.
>>
>>I also tried what Hilmar suggested: checked the condition if it is numeric.
>>I put it in a variable like this ...
>>
>>? TYPE("oExcel.Cells[2,9].Value")
>>
>>and it turned out to be numeric.
>>
>>I didnt understand why it works with a character data type field and gives error with numeric.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform