Thanks for your help, anhn, but your code does not work, it is stuck in the loop not going anywhere.

I'm working from VB6, and this code works:
Code:
On Error GoTo Done
ttop:
    Set oExcel = GetObject(, "Excel.Application")
    oExcel.Application.DisplayAlerts = False
    oExcel.Quit
    Set oExcel = Nothing
    GoTo ttop
Done:
    Exit Sub
but only when stepping through it, if its running only one excel file closes at most.
maybe setting oExcel = Nothing is not enough, it does not latch on to another window and gets an error?