Dim excel As New Microsoft.Office.Interop.Excel.Application() Dim wb As Microsoft.Office.Interop.Excel.Workbook = excel.Workbooks.Open(txtFileLocations.Lines(w)) Dim ws As Microsoft.Office.Interop.Excel.Worksheet = TryCast(excel.ActiveSheet, Microsoft.Office.Interop.Excel.Worksheet)
when the program tries to opens an excel file, it always throws me an error "Office has detected a problem with this file. Editing may hard your computer" and my program crushes.......
The problem appears on the SECOND line, on DIM wb...blahblah..
i went to the office and unclicked the "protected view" checkboxes.. but it still throws me those errors.
my guess is that the office i have in the computer is not the same as the one that my program uses to open excel files (i mean, i loaded/imported some excel.dll files in the program so i guess that will be the one)
But how do i make the program not care if the excel file is "potentially dangerous"? i KNOW it is not.
and i dont understand how did that happen just NOW, out of the blue :S