ByRef type mismatch when invoking a sy+ub

Hi.
I am getting a "By Ref argument type mismatch" which I can't understand

The error is below:

Screen-Shot-2018-03-10-at-18.41.02.png
but the argument looks correct (it is declared)

Screen-Shot-2018-03-10-at-18.41.02.png
and the sub is defined:

Screen-Shot-2018-03-10-at-18.41.02.png
can anyone help?
Screen-Shot-2018-03-10-at-18.43.32.png
Screen-Shot-2018-03-10-at-18.45.52.png
João serras-pereiraAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Martin LissOlder than dirtCommented:
The sub expects an Integer but you are passing a double. Change either one so that they match.
0
Jim Dettman (Microsoft MVP/ EE MVE)President / OwnerCommented:
In your dim statement you cannot follow each with a comma and then put the last serval “as <type>“

So right now only the last variable in your dim statement is a double. All the rest of them are variants.

You need to use “as <type>” for each

Jim
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
João serras-pereiraAuthor Commented:
Hi THANKS!!!! did not know that!!!
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft Access

From novice to tech pro — start learning today.