|
|
|||||||||
|
|||||||||
|
|||||||||
| |
||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
How to Call a Function
Hi!
What is it that allows me to Call a Function in another Function? I have written a Function in a Module. Then I have written another Function in another Module. I want to call the first in the second but Sometimes it works and sometimes it doesn't. Should I declare in a specific way the function I want to call-up in other places? Thanx for the help ![]() |
|
#2
|
|||
|
|||
|
If your function is public then just
myResult = MyFunction(myArgs)
__________________
====== Doug G ====== I didn't attend the funeral, but I sent a nice letter saying I approved of it. --Mark Twain |
|
#3
|
|||
|
|||
|
Doug, thanx for your answer, but I still can't seem get it to work... I get the following error message: "Expected variable or procedure, not module"....
|
|
#4
|
|||
|
|||
|
THIS CALLS A PRIVATE SUB....the Command8_Click is a Private Sub that starts off like this:
Private Sub Command8_Click() Call Command8_Click BELOW YOU SEE THE CALL COMMAND AGAIN....in this example it is calling the code below it....the Function Wait....when called it waits for a second..... Call Wait(1, 1) Function Wait(Delay As Integer, DispHrglass As Integer) ' This function creates a time delay you must use a call to run it Call Wait(2,1) Dim DelayEnd As Double DoCmd.Hourglass DispHourglass DelayEnd = DateAdd("s", Delay, Now) While DateDiff("s", Now, DelayEnd) > 0 Wend DoCmd.Hourglass False HOPE THIS HELPS |
![]() |
| Viewing: ASP Free Forums > Programming > Visual Basic Programming > How to Call a Function |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|