Go4Expert

Go4Expert (http://www.go4expert.com/)
-   Visual Basic ( VB ) (http://www.go4expert.com/forums/visual-basic/)
-   -   Urgent - help Using an Excel formula in VBA (http://www.go4expert.com/forums/urgent-help-using-excel-formula-vba-t24245/)

nicoPK 23Dec2010 18:34

Urgent - help Using an Excel formula in VBA
 
The formula is: =IF(Input!R703<0,HPLNK(Input!R703,Entity,Category6 ,$A$677&"."&$A703,N$3,Frequency1,Application1),HPL NK(Input!R703,Entity,Category6,"P1709"&"."&$A703,N $3,Frequency1,Application1))
This works fine is excel so I know the syntax is ok with Excel

When I try this in VB:
Range("N679").Select
Selection.Formula = "=IF(Input!R679<0,HPLNK(Input!R679,Entity,Cate gory 6,$A$677&"."&$A679,N$3,Frequency1,Application1),HP LNK(Input!R679,Entity,Category6,"P1709"&"."&$A679, N$3,Frequency1,Application1))"

I get a compile error with syntax

Can you help?


All times are GMT +5.5. The time now is 01:46.