Public Sub Help

G

Guest

This is the define line of my public function

Public Sub Feeder(i As Integer, FinalRow As Integer, s As
Integer, f As Integer)

This is how I am trying to call it:

Call Feeder (i, FinalRow, s, f)

The program gives a compiler error and sys
"ByRef Argument Type Mismatch"

I defined the four variables in my program as integers,
so I can't figure out why it isn't working. Thank you
 
B

Bob Flanagan

In the procedure that calls Feeder, are the variables i, FinalRow, s, f all
defined as integer?

You can also call it by the following:

Feeder i, FinalRow, s, f

Bob Flanagan
Macro Systems
http://www.add-ins.com
Productivity add-ins and downloadable books on VB macros for Excel
 
B

Bob Phillips

Are those variables defined in the macro that calls Feeder? If not, and you
don't have Option Explicit, it could be implicit variant variables.

--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)
 
Top