• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 53
  • Last Modified:

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
0
João serras-pereira
Asked:
João serras-pereira
1 Solution
 
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
 
João serras-pereiraAuthor Commented:
Hi THANKS!!!! did not know that!!!
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now