VBA & MS Excel 2010 Run-time error '13' -


i have got project colleague. when try run macro, error 'run-time error '13': type mismatch'

any ideas causing this? code causing in vba is:

worksheets("model").range("a" & + 5).value = worksheets("model").range("a" & + 5).value + rating * worksheets("parameters").range("e" & paramerange).value 

thanks help!

have set value of , paramerange whole number value? can 0 in formular paramerange must positive whole number.

you can check different parts of line try find error.

sub testline1() dim integer dim rating integer dim paramerange integer rating = 2 paramerange = 13 = 1  msgbox(worksheets("model").range("a" & + 5).value) msgbox cstr(worksheets("model").range("a" & + 5).value + rating * worksheets("parameters").range("e" & paramerange).value)   end sub 

Comments

Popular posts from this blog

java - activate/deactivate sonar maven plugin by profile? -

python - TypeError: can only concatenate tuple (not "float") to tuple -

java - What is the difference between String. and String.this. ? -