R
Rich Wallace
Is there a way to open an Excel file and either respond to or supress the
Macro warning window via VB.NET?
Dim oExcel As Excel.Workbook
Dim sFilePath As String = "C:\DailyReport.xls"
oExcel = GetObject(sFilePath) --> Throws Macro warning window
oExcel.Unprotect("password")
Try
cnExcel.Open()
cnExcel.Close()
Catch ex As Exception
MsgBox(ex.Message)
Finally
oExcel.Close()
End Try
Thanks,
-Rich
Macro warning window via VB.NET?
Dim oExcel As Excel.Workbook
Dim sFilePath As String = "C:\DailyReport.xls"
oExcel = GetObject(sFilePath) --> Throws Macro warning window
oExcel.Unprotect("password")
Try
cnExcel.Open()
cnExcel.Close()
Catch ex As Exception
MsgBox(ex.Message)
Finally
oExcel.Close()
End Try
Thanks,
-Rich