I have made a code using function and not sub in the module. the function will be used for every form i made,
the function is used to calculate the average and generate it when the after update event happen.
the code:
Public Function Average()
On Err Goto Err_Handler
Code**************
******************
Exit_Handler:
Exit Function --> repeat the function
Err_Handler:
MsgBox Err.Description
Resume Next
End Function
my problem is i cannot figure it out why the function is always repeating it self after the exit function ? is there any way to escape the function without using exit function?
and also is there any good tip for making good function in module?
and why I cannot use sub in the module?
the function is used to calculate the average and generate it when the after update event happen.
the code:
Public Function Average()
On Err Goto Err_Handler
Code**************
******************
Exit_Handler:
Exit Function --> repeat the function
Err_Handler:
MsgBox Err.Description
Resume Next
End Function
my problem is i cannot figure it out why the function is always repeating it self after the exit function ? is there any way to escape the function without using exit function?
and also is there any good tip for making good function in module?
and why I cannot use sub in the module?