Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,355
Default Calling a function in another module

How do I call function "TestFunction" that's located in Module1 when I'm
working in Module2?

Thanks
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 21
Default Calling a function in another module

Use:
Call Module1.TestFunction

"Barb Reinhardt" wrote:

How do I call function "TestFunction" that's located in Module1 when I'm
working in Module2?

Thanks

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,355
Default Calling a function in another module

I want to concatenate the result of the test function with "Milestone"

Right now, I have "Milestone" & testfunction()

but it doesn't work with the call part.

Suggestions?

"Rahul Gupta" wrote:

Use:
Call Module1.TestFunction

"Barb Reinhardt" wrote:

How do I call function "TestFunction" that's located in Module1 when I'm
working in Module2?

Thanks

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 21
Default Calling a function in another module

write Testfunction as

Function Testfunction(ByVal Data_to_be_concatenate As DataType) As ReturnType

for example:

Function TestFunction(ByVal s as String) As String

Hope this will help.

Regards,
Rahul


"Barb Reinhardt" wrote:

I want to concatenate the result of the test function with "Milestone"

Right now, I have "Milestone" & testfunction()

but it doesn't work with the call part.

Suggestions?

"Rahul Gupta" wrote:

Use:
Call Module1.TestFunction

"Barb Reinhardt" wrote:

How do I call function "TestFunction" that's located in Module1 when I'm
working in Module2?

Thanks

  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 10,593
Default Calling a function in another module

Application.Run "Milestone" & testfunction()


--
HTH

Bob Phillips

(replace somewhere in email address with gmail if mailing direct)

"Barb Reinhardt" wrote in message
...
I want to concatenate the result of the test function with "Milestone"

Right now, I have "Milestone" & testfunction()

but it doesn't work with the call part.

Suggestions?

"Rahul Gupta" wrote:

Use:
Call Module1.TestFunction

"Barb Reinhardt" wrote:

How do I call function "TestFunction" that's located in Module1 when

I'm
working in Module2?

Thanks





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 a module [email protected] Excel Discussion (Misc queries) 1 September 28th 07 04:03 PM
Calling a Macro from module peter.thompson[_61_] Excel Programming 2 January 21st 06 11:14 PM
Calling worksheet module from other module. Michael Malinsky Excel Programming 2 December 14th 05 08:47 PM
Calling VBA function that is in another module Jag Man Excel Programming 2 January 7th 04 03:37 AM
Calling a module function from a class method ranafout[_2_] Excel Programming 1 November 12th 03 11:08 AM


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