this is what i have:
I thought I could try to link to an active excel instance untill i get an error and that way close them all. but this is not the case. somtimes it closes only one file, sometimes it gets stuck. the problem is any excel instance i would have open would be hidden, and i cannot see any notify prompts, so it gets stuck even with DisplayAlerts = FalseCode:Private Sub CleanExcel() On Error GoTo err ttop: Set oExcel = GetObject(, "Excel.Application") oExcel.Application.DisplayAlerts = False oExcel.Quit Set oExcel = Nothing GoTo ttop err: Exit Sub End Sub
what would be another way to do this?




Reply With Quote