Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 309
Default Using functions and subroutines in other modules

I have some functions and subroutines define in Module1.
How would I go about using/calling these functions
from Module 2???

(sorry if that is a newb question)


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Using functions and subroutines in other modules


Use the CALL function like this:


Code:
--------------------
Sub One()
Msgbox "This is One, Next is Two",vbokonly,"Sub One"
Call Two
End Sub

Sub Two()
Msgbox "This is Two, Next is Three",vbokonly,"Sub Two"
Call Three
End Sub

Sub Three()
Msgbox "This is Three, Next is Four",vbokonly,"Sub Three"
Call Four
End Sub

Sub Four()
Msgbox "This is Four, End of messages!",vbokonly,"Sub Four"
End Sub
--------------------


Robert Crandal;571510 Wrote:
I have some functions and subroutines define in Module1.
How would I go about using/calling these functions
from Module 2???

(sorry if that is a newb question)



--
Simon Lloyd

Regards,
Simon Lloyd
'Microsoft Office Help' (http://www.thecodecage.com)
------------------------------------------------------------------------
Simon Lloyd's Profile: http://www.thecodecage.com/forumz/member.php?userid=1
View this thread: http://www.thecodecage.com/forumz/sh...d.php?t=157884

Microsoft Office Help

  #3   Report Post  
Posted to microsoft.public.excel.programming
dan dan is offline
external usenet poster
 
Posts: 866
Default Using functions and subroutines in other modules

In Module2 simply call the Functions and Procedures as you would in Module1
but its often best to qualify you calls...

Module1.Procedure1(x)

x = Module1.Function1(x)

etc, etc ...

"Robert Crandal" wrote:

I have some functions and subroutines define in Module1.
How would I go about using/calling these functions
from Module 2???

(sorry if that is a newb question)


.

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
List of Subroutines/functions in a workbook [email protected] Excel Programming 1 December 6th 08 02:09 AM
Calling subroutines from Class Modules davidm Excel Programming 1 February 23rd 06 03:42 AM
Subroutines vs. modules BrianG[_4_] Excel Programming 0 September 7th 04 10:21 PM
Calling Add-In subroutines from other modules sclark Excel Programming 6 February 3rd 04 05:45 PM
Conceal functions and subroutines? raj Excel Programming 4 November 12th 03 03:40 PM


All times are GMT +1. The time now is 11:08 AM.

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"