Why does the following code throw a system.unauthorizedaccessexception
Tr
Dim XSL As New Excel.Applicatio
Dim XWB As Excel.Workbook = XSL.Workbooks.Open("C:\excelfile.xls"
Dim XWS As Excel.Worksheet = XWB.Worksheets.Item(1
TextBox1.Text = XWS.Range("a1").Valu
Catch X As System.UnauthorizedAccessExceptio
MsgBox(X.Message
End Tr
The exception is thrown on the line "dim xsl as new excel.application"