i working vba excel. "application defined or object defined" error each time run code. here is:
sub test() dim integer, j integer, k integer, l integer, t integer dim row integer dim maturite integer dim tsup double, tinf double dim datetaux date, datejouissance date dim taux double = 2 770 maturite = sheets("em").cells(i, 19) datejouissance = sheets("em").cells(i, 14) l = 2 255 k = 0 10 t = 1 10 row = 13 * k + 2 datetaux = sheets("tsr").cells(row, l) taux = sheets("tsr").cells(13 * k + 3, l) if taux <> 0 if datejouissance = datetaux if 91 <= maturite , maturite <= 182 tsup = sheets("tsr").cells(row + 2, j) tinf = sheets("tsr").cells(row + 1, j) sheets("em").cells(i, 21).value = ((tsup - tinf) * (maturite - 91) / (182 - 91)) + tinf end if end if end if next next next next end sub
i error @ :
tsup = sheets("tsr").cells(row + 2, j)
i tried using :
tsup = sheets("tsr").cells(row + 2, j).value
the type of sheets("tsr").cells(row + 2, j).value double. it's not working. can't seem understand problem is.
thanks in advance
i think may need check value of j. far can see code value remains 0. column 0 not exist , lead given error.
Comments
Post a Comment