LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 38
Default Calling VBA function that is in another module

If I write

Private Function myFunct() As Long
....
End Function

Sub mySub()

I = myFunct()

....

End Sub

everything is OK. However, suppose I wish to put myFunct() in a separate
module. Then
it fails because the compiler can't find it. If myFunct() was in a DLL I
could use Declare
to tell the compiler about it, but that seems to work only for DLLs.

How can I get around this? Or, must all functions used in a module be
defined in it?


TIA

Ed


 
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 a function in my SQL-DB from VBA KSor Excel Discussion (Misc queries) 0 March 11th 09 02:08 PM
calling a module [email protected] Excel Discussion (Misc queries) 1 September 28th 07 04:03 PM
Calling function from a userform Jeff Excel Discussion (Misc queries) 0 September 27th 06 03:27 PM
Calling a module function from a class method ranafout[_2_] Excel Programming 1 November 12th 03 11:08 AM
Calling Macros oustide current module Mic[_2_] Excel Programming 2 October 28th 03 05:52 PM


All times are GMT +1. The time now is 10:34 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"