Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
When I am attempting to delete a worksheet from a collection the
command is failing. I have disabled events, and re-enable them after I delete the worksheets. For whatever reason, it is not completing the delete operation. If I make the worksheet visible and enable the events while debugging I can see the message box pop up saying data may exist, click delete to delete permanently. I can hear the error beep when the events are disabled. I am not sure what exaclty is going on here, any help would be greatly appreciated. The code is below. xlApp.EnableEvents = False xlWb = xlApp.Workbooks.Add() tempXlWb.worksheets("WAR Premium Allocation").Copy(Befo=xlWb.Worksheets("Sheet1" )) xlWb.Worksheets("Sheet1").Delete() xlWb.Worksheets("Sheet2").Delete() xlWb.Worksheets("Sheet3").Delete() xlApp.EnableEvents = True |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Turn off "CALCULATE" on bottom of Excel worksheet. near "Ready" | Excel Discussion (Misc queries) | |||
Excel - Golf - how to display "-2" as "2 Under" or "4"as "+4" or "4 Over" in a calculation cell | Excel Discussion (Misc queries) | |||
Excel "Move or Copy" and "Delete" sheet functions | Excel Worksheet Functions | |||
How2 Delete "Not exist" charts/sheets? | Excel Programming | |||
Adding "New" "Insert" "Delete" into a workbook to change from data 1 to data 2 etc | Excel Programming |