none
microsoft excel is waiting for another OLE Action to complete error occuring - how to avoid this error RRS feed

  • Question

  • My application is written in VB.Net code. when closing the excel we are creating notepad file at background.it will take some 15- 30 mins time.At this time i am opening a new excel and checking the excel state. when reading the below line i am getting 'microsoft excel is waiting for another OLE Action to complete error occuring' in office 2013  how to avoid this error.

               

    Dim ExcelApp As Microsoft.Office.Interop.Excel.Application
            ExcelApp = GetObject(, "Excel.Application")

            If ExcelApp Is Nothing Then
                Exit Function
            End If

            Dim owrkbk As Short
            owrkbk = ExcelApp.Workbooks.Count

            If owrkbk > 0 Then
    ExcelApp.ActiveWorkbook.Windows(1).WindowState = Microsoft.Office.Interop.Excel.XlWindowState.xlMaximized    'Getting error here
            End If

            ExcelApp = Nothing

    KIndly suggest some workaround to resolve this issue.


    prince rajan


    Wednesday, March 26, 2014 5:24 PM

Answers