|
web
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
System.Diagnostics.Process.Start FreezesI am using the system.diagnostics.process.start command to launch an
excel template. Once open the user has the option to create a new template through a wizard I have created. When the wizard finishes it goes back through the same routine to open the new template. Everything works fine until it reaches the process.start line of code then it just freezes. I assume this is because the process (Excel) is already started. I am looking for a workaround to this, and it does not matter if I get a new instance of excel or not. I have tries the process.startinfo.CreateNoWindow as true and false but neither worked. I am using a vb6 dll that communicates via interop to the wizard which is written in .net 2003. The wizard works fine to create the first template and the interop communication is working as well. Any thoughts will be greatly appreciated. LoDawg wrote:
Show quoteHide quote > I am using the system.diagnostics.process.start command to launch an Hi,> excel template. Once open the user has the option to create a new > template through a wizard I have created. When the wizard finishes it > goes back through the same routine to open the new template. Everything > works fine until it reaches the process.start line of code then it just > freezes. I assume this is because the process (Excel) is already > started. I am looking for a workaround to this, and it does not matter > if I get a new instance of excel or not. I have tries the > process.startinfo.CreateNoWindow as true and false but neither worked. > I am using a vb6 dll that communicates via interop to the wizard which > is written in .net 2003. The wizard works fine to create the first > template and the interop communication is working as well. Any thoughts > will be greatly appreciated. Please check whether you close / kill the excel instance when you are done with it. This might hang your program. I also had this problem with Word. An instance was open already which was associated with my program. When i again used the same program it used to hang. Then i killed the instance of the word every time i was done using it, and it is working fine now. You can check whether excel.exe is still running when you are done with it in Task manager. Hope it helps you ! Thanks ! Thanks for the quick reply coolCoder, but the existing excel workbook
needs to reamain open even after creating the new one. Just so no one wastes their time anymore I foxed this by opening the
new workbook from the dll instead. I have to pass more info through the interop than I like as it is slower but it works. So thanks again coolCoder for you suggestions. |
|||||||||||||||||||||||