Public Sub Help

  • Thread starter Thread starter Guest
  • Start date Start date
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
 
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
 
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)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top