Sorry but it doesn't make sense to me. Why would you use If App.PrevInstance = True Then End if you wanted more than one instance of the program to run since that would prevent it? Why are you showing us dim frmM as new frmmain? are you talking about multiple instances of a form rather than a program?