Question : How do I prevent Excel Window from popping up when running?

Hello

I am trying to run an Excel Application from VB.NET without any Excel window popping up.

But I cannot seem to achieve this.

Here is my code ...

..................................................



        myProcess.StartInfo.UseShellExecute = False
        myProcess.StartInfo.CreateNoWindow = True
        myProcess.StartInfo.RedirectStandardOutput = True
        myProcess.StartInfo.WindowStyle = ProcessWindowStyle.Hidden
        myProcess.StartInfo.Arguments = "C:\oldf\MYEXCEL\calconepercentile.xls"
        myProcess.StartInfo.FileName = "C:\Program Files\Microsoft Office\OFFICE11\excel.exe"
        myProcess.Start()
        myProcess.WaitForExit()

...............................

An Excel window flashes on and off the screen as it runs.

Surely, this should not be happening?

Karl

Answer : How do I prevent Excel Window from popping up when running?

Oops, sorry, forgot the snippet.  Here it is now.

Cheers,
Randy
1:
2:
3:
        Dim xlaTest As Excel.Application = CType(CreateObject("Excel.Application"), Excel.Application)
        'xlaTest.Visible = True
        Dim wbkFrom As Excel.Workbook = xlaTest.Workbooks.Open("D:\Tests\VB Trials\ExcelRunApp\book1.xls")
Random Solutions  
 
programming4us programming4us