I am trying to use functions in VBA.
I have a simple fundtion which does some operations. At the end of function, I want the code to resume from the next line of the code where I called this function from. I am getting the error message:
" Runtime error '3'
Exit without GoSub"
Can anyone help me?
The following is the code:
Dim j As Integer Sub try() j = 11 Calc (void) j = 12 Calc (void) j = 13 Calc (void) j = 14 Calc (void) End Sub Function Calc() //Operations performed// j = j + 5 Return End Function
I am new to using functions. So, pardon me if i am not using the correct syntax. Please enlighten me.