I have a VB.net code that opens excel files from different directories. The only problem is that the program always opens them in Excel2003 version even if the file is an XLSM file (Excel 2007).
I have excel 2003 and 2007 installed (I need both versions because I deal with files in both versions) and I would like the program to open each file in its corresponding version. Here is the code I have
The files "DC_Weibull_Template_V3.xlsm" will open in excel 2003 compatibility mode and I want it to open as an Excel 2007 file.
Any idea what I can do to fix this?
Marino
I have excel 2003 and 2007 installed (I need both versions because I deal with files in both versions) and I would like the program to open each file in its corresponding version. Here is the code I have
VB.NET:
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
Dim exp, wafer, name As String
Dim oExcel As Object
oExcel = CreateObject("Excel.Application")
If ComboBox1.Text = "DC Template (xls)" Then
oExcel.Workbooks.Open("\\Givott01\groupiv\FTP Dropbox\Carla\Marwan\Templates\DC_Weibull_Template_V3.xlsm")
.
.
End Sub
The files "DC_Weibull_Template_V3.xlsm" will open in excel 2003 compatibility mode and I want it to open as an Excel 2007 file.
Any idea what I can do to fix this?
Marino