View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Ed Ed is offline
external usenet poster
 
Posts: 399
Default Help with "Waiting for OLE Action" error?

I use a macro in Excel 2000 to filter the worksheet, copy the filtered
range, and then call a Word document. The Word document has AutoOpen and
other macros to paste in the cells and format them as a Word table. That
all works well.

But when the Word doc closes, I'm looking at an error message in Excel:
"Excel is waiting for another application to complete an OLE action." As
soon as I click OK, the error box closes and the macro finishes.

As soon as the Excel macro calls Word, I'd like to just reset the worksheet
and be done with Excel. Is there a way I can do this? The code after
calling Word is below. Thanks for any help given.

Ed

Set WD = CreateObject("Word.Application")
WD.Documents.Add ("ERT_EFF_List(num)")
' Reset worksheet
' Unhide everything
Sheets("Sheet1").Activate
Sheets("Sheet1").AutoFilterMode = False
With Cells
.EntireColumn.Hidden = False
.EntireRow.Hidden = False
End With
Application.CutCopyMode = False
Range("A1").Select
Application.ScreenUpdating = True