VBA close access after all functions finished -
i have got vba running batch starts macro execute them, trying close down access once functions have finished making new function , placing "application.quit" closing application before functions have finished.
anyone have ideas?
thanks, simon
edit:
public function finish() application.quit end function
put timer loop in code put db sleep , give time functions run.
first, put under option compare or option explicit line in module (note: must in proper module, , not form's module):
declare sub sleep lib "kernel32" (byval dwmilliseconds long)
then function should this:
public function finish() dim x integer x = 1 10 sleep 1000 doevents next x application.quit end function
Comments
Post a Comment