Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 39
Default Calling Functions

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!

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 274
Default Calling Functions

On Nov 9, 6:10 am, David 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


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 39
Default Calling Functions

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

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Calling of functions Krishna@Citigroup Excel Programming 0 November 11th 04 07:58 AM
Calling functions from dll T.K Kullervo Excel Programming 0 September 29th 03 09:55 AM
Calling certain functions within VBA Myrna Larson[_2_] Excel Programming 0 August 11th 03 10:57 PM
Calling certain functions within VBA james Excel Programming 0 August 11th 03 10:27 PM
Calling VBA functions from a xll Kim[_8_] Excel Programming 2 August 3rd 03 11:48 AM


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

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"