Honestly, I don't understand what exactly you are doing so that your application closes before all your functions have finished.
If you want to execute some functions and then close the app, there are two ways how you can do it:
Put several RunCode
actions in the macro, each one executing one of your functions and the last one executing Application.Quit
.
Write a "runner" function that executes all the others and then quits:
Public Function F1()
'do stuff
End Function
Public Function F2()
'do stuff
End Function
Public Function Finish()
Application.Quit
End Function
'execute this function from the macro:
Public Function Runner()
F1
F2
Finish 'or directly call "Application.Quit" here instead
End Function
No matter which of these ways you choose, Access executes the functions in the specified order, one after the other...and it shouldn't close before everything is finished!
If it does, I suppose you're doing something different.
As already suggested by shahkalpesh in his comment - show us more code, then.
Quit
is closing the application before the functions have finished?