Quantcast
Viewing all articles
Browse latest Browse all 15722

[RESOLVED] Windows 10 - Excel

I have just run a programme under widows 10 (previously ran under windows 7) which opens an excel file and reads the data, then closes the excel file. When this ran under windows 7, it did this in the background and did not display the excel file on screen.

Now that this is converted to windows 10, when it reads the excel file, it display excel on the screen just like it had been opened from the command prompt. Is there a reason for this ?

The code that opens the file is below and has the excel Visible se to False ?

Code:

        Try
            xlApp = CreateObject("Excel.Application")
        Catch ex As Exception
            MsgBox("Error Defining Excel Object")
            Exit Function
        End Try

        Try
            xlApp.Workbooks.Open(fileAndPathName)
            xlApp.Visible = False
            xlApp.WindowState = vbMaximizedFocus
            xlApp.UserControl = True
        Catch ex As Exception
            MessageBox.Show("Error 1 Opening File" & Environment.NewLine & ex.Message)
            Exit Function
        End Try


Viewing all articles
Browse latest Browse all 15722

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>