PC Review


Reply
Thread Tools Rate Thread

Calling Functions

 
 
David
Guest
Posts: n/a
 
      9th Nov 2007
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!

 
Reply With Quote
 
 
 
 
John Coleman
Guest
Posts: n/a
 
      9th Nov 2007
On Nov 9, 6:10 am, David <skulkrinb...@googlemail.com> wrote:
> 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


 
Reply With Quote
 
David
Guest
Posts: n/a
 
      9th Nov 2007
Thanks you're right. I've been scratching my head over that one for a
few minutes.

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Re: Calling functions using DLL Douglas J. Steele Microsoft Access VBA Modules 1 8th Jan 2007 06:57 PM
calling functions dave Microsoft Access Form Coding 5 11th Apr 2005 07:56 AM
Calling C++ Functions Steven Livingstone Microsoft VC .NET 4 10th Feb 2004 01:16 PM
Calling functions from dll T.K Kullervo Microsoft Excel Programming 0 29th Sep 2003 09:55 AM
Calling Add-in functions from VBA Mark Microsoft Excel Programming 5 12th Sep 2003 08:49 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 09:18 PM.