AutoChris 0 Posted March 22, 2004 Is it possible to end a function without ending the script?I have a script with multiple functions. The problem I am having is that I want a particular function to end if there is an error but leave the script running so other functions can be called.If I put "Exit" after the If statement then the whole script terminates. If I try "EndFunc" then I get an error message saying that I'm missing the "EndIf" statement. What can I do to make this possible? Here is part of my script with the Exit option...Func Program() $name = Inputbox("File name", "What do you want to call the file?", "") If @error = -1 Then Exit EndIfEndFunc Share this post Link to post Share on other sites
dmbech 0 Posted March 22, 2004 Just use Return instead of Exit Share this post Link to post Share on other sites
AutoChris 0 Posted March 22, 2004 Ahhhh.... I knew it was something stupid! Thanks a lot, dmbech! :iamstupid: Share this post Link to post Share on other sites