ByRef argument mismatch

  • Thread starter Thread starter Steven
  • Start date Start date
S

Steven

I have a Function that I call from a form for example:

Call SizeAccess(100,100,200,300)

I would like to use variables in this for example:

Dim PosOne, PosTwo, PosThree, PosFour as Double
PosOne = 100
PosTwo = 100
PosThree = 200
PosFour = 400
Call SizeAccess(PosOne, PosTwo, PosThree, PosFour)

But when I compile it I get an error that says: "ByRef
argument mismatch"

What is the problem and solution here?

Thank you for your help.

Steven
 
Also note that:

PosOne, PosTwo, and PosThree are all being declared as a
Variant datatype.

Only PosFour is declared as a Double.

Dim PosOne as Double
Dim PosTwo as Double, PosThree as Double, PosFour as Double


Chris

-----Original Message-----
Dim PosOne, PosTwo, PosThree, PosFour as Double
PosOne = 100
PosTwo = 100
PosThree = 200
PosFour = 400
Call SizeAccess(PosOne, PosTwo, PosThree, PosFour)

Function/Procedure SizeAccess has 4 parameters. Are they
numeric - double type? If not, change declaration.
Parameters and your variables must be the same type or
change SizeAccess parameters:
 
Back
Top