Application-defined or object-defined error

  • Thread starter Thread starter jodleren
  • Start date Start date
J

jodleren

Hello

This formula causes me trouble.
The sLine is Trim(Str(j)), a line counter.
If I leave out the equals sign (=), and activate the formula
afterwards, it all works well... so the formula is correct.
It only uses the B7 to check for a value, and calculated the H
field... result in I field. There are 6 other (2 complex ones like
this) which does not cause any problems.
The DoEvents was an idea, it does not change much.

DoEvents
Worksheets("Start").Cells(j, 9).Formula = "=IF($B$7=1;H" & sLine &
";((H" & sLine & "/2/$B$7)+((H" & sLine & "/2))+((H" & sLine & "/2)
*0,05)/$B$7))"

BTW; I have no idea what the formula does.... it was given to me...

Any ideas?

WBR
Sonnich
 
Try

Worksheets("Start").Cells(j, 9).Formula = "=IF($B$7=1,H" & sLine & ",((H" &
sLine & "/2/$B$7)+((H" & sLine & "/2))+((H" & sLine & "/2)*0.05)/$B$7))"

If this post helps click Yes
 
It took me some time to see it - you use commas in stead of
semicolons, though Excel changes them back to semicolons....
It works, but I dont get why...

WBR & thanks
Sonnich
 
Back
Top