Code Comments
Programming Forum and web based access to our favorite programming groups.Just to make sure: I have a VB Project that does not contain any Forms or controls. So I start my Project in Sub Main in the Module. Do I need to do anything to terminate this Project since 'Unload Me' will not work in the Module? Is it OK just to let the code run until it gets to the End Sub in Sub Main (and that will be the end of the story)? Makes sense, but I want to make sure that's what should happen. ---- Andy
Post Follow-up to this message"Andy" <Andrzej7@hotmail.com> wrote in message news:1b5e01c4bd04$36ff8210$a601280a@phx.gbl... > > Just to make sure: > > I have a VB Project that does not contain any Forms or > controls. So I start my Project in Sub Main in the Module. > > Do I need to do anything to terminate this Project > since 'Unload Me' will not work in the Module? Is it OK > just to let the code run until it gets to the End Sub in > Sub Main (and that will be the end of the story)? Absolutely. If you ever find a situation where it isnt' terminating, then you have larger problems that you need to fix. I've never seen that in the situation that you described, though. If you don't have any forms or controls, it's hard to create a scenario where objects won't let themselves be closed. matt
Post Follow-up to this message"Andy" <Andrzej7@hotmail.com> wrote in message news:1b5e01c4bd04$36ff8210$a601280a@phx.gbl > Just to make sure: > > I have a VB Project that does not contain any Forms or > controls. So I start my Project in Sub Main in the Module. > > Do I need to do anything to terminate this Project > since 'Unload Me' will not work in the Module? Is it OK > just to let the code run until it gets to the End Sub in > Sub Main (and that will be the end of the story)? > > Makes sense, but I want to make sure that's what should > happen. That's what should happen. -- Reply to the group so all can participate VB.Net... just say "No"
Post Follow-up to this messageOn Thu, 28 Oct 2004 08:38:47 -0700, "Andy" <Andrzej7@hotmail.com> wrote: > >Just to make sure: > >I have a VB Project that does not contain any Forms or >controls. So I start my Project in Sub Main in the Module. > >Do I need to do anything to terminate this Project >since 'Unload Me' will not work in the Module? Is it OK >just to let the code run until it gets to the End Sub in >Sub Main (and that will be the end of the story)? > >Makes sense, but I want to make sure that's what should >happen. Funny enough, it works out exactly as that. Your main shoudl call up a module function from which all other functions tree out. When it is finished, the control is returned to the calling sub (the Main) a nd whan it hits the End Sub, it finishes and unloads itself from memory. **************************************** ****************************** Richard Jalbert Programmer-Analyst Richmann@sympatico.ca Dogs have owners, cats have staff. http://www3.sympatico.ca/richmann/ **************************************** ******************************
Post Follow-up to this message
Show a Printable Version
Email This Page to Someone!
Receive updates to this thread
Powered by vBulletin
Copyright 2000-2006 Jelsoft Enterprises Limited.