By using expertatexcel.com you agree to our cookie policy, We and our partners operate globally and use cookies, for multiple purposes

Become an Σxpert at Σxcel.com

 


byRef argument type mismatch - syntax error

This is a common error where the type you're passing to a routine doesn't match the type the routine is expecting.

Example:



Fix

Put parenthesis around the passed parameter

FixTheCode r,c ' doesn't work ByRef argument type mismatch

FixTheCode (r),(c) ' where r and c are variants

Sub FixTheCode(r as long, c as long)

.....

End Sub