Calling Functions

D

David

I've got a Module like this:

Public Sub Overpayments()

code

End Sub

When I try to call this Sub using:

Call Overpayments

I get an error "Compile Error: Expected variable or procedure, not
module"

What did I do wrong and how can I fix it? Sorry if this is a very
basic question.

Thanks!
 
J

John Coleman

I've got a Module like this:

Public Sub Overpayments()

code

End Sub

When I try to call this Sub using:

Call Overpayments

I get an error "Compile Error: Expected variable or procedure, not
module"

What did I do wrong and how can I fix it? Sorry if this is a very
basic question.

Thanks!

My guess is that you have both a module and a sub called Overpayments,
so VBA is unhappy with the name clash. If so, try renaming the
moduleModOverpayments

hth

-John Coleman
 
D

David

Thanks you're right. I've been scratching my head over that one for a
few minutes.
 

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

Top