Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I'm running this code:
-------------------------------------------------------------- DoCmd.SetWarnings False On Error Resume Next With mySS .Worksheets("Sheet1").Delete .Worksheets("Sheet2").Delete .Worksheets("Sheet3").Delete End With On Error GoTo ProjectedPayments_SpreadsheetCreate_err DoCmd.SetWarnings True -------------------------------------------------------------- in an effort to clean up any empty sheets the user's Excel options may have automagically created when my code creates/populates a .XLS. Similar code hasn't given me any trouble, but in this particular application, it's causing Excel to pop a warning/confirmation dialog: "Data may exist in the sheet(s) selected for deleting. To permanently delete the data, press Delete." I guess I'm doing something to make Excel think I've populated one or more cells in the sheets in question. Is there some way for me to suppress that dialog so the user doesn't have to see/respond to it? -- PeteCresswell |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Application.DisplayAlerts = False
-- Jim "(PeteCresswell)" wrote in message ... | I'm running this code: | -------------------------------------------------------------- | DoCmd.SetWarnings False | On Error Resume Next | With mySS | .Worksheets("Sheet1").Delete | .Worksheets("Sheet2").Delete | .Worksheets("Sheet3").Delete | End With | On Error GoTo ProjectedPayments_SpreadsheetCreate_err | DoCmd.SetWarnings True | -------------------------------------------------------------- | | in an effort to clean up any empty sheets the user's Excel | options may have automagically created when my code | creates/populates a .XLS. | | | Similar code hasn't given me any trouble, but in this particular | application, it's causing Excel to pop a warning/confirmation | dialog: | | "Data may exist in the sheet(s) selected for deleting. To | permanently delete the data, press Delete." | | | I guess I'm doing something to make Excel think I've populated | one or more cells in the sheets in question. | | Is there some way for me to suppress that dialog so the user | doesn't have to see/respond to it? | -- | PeteCresswell |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Per Jim Rech:
Application.DisplayAlerts = False Now that was *quick*... -) Thanks. -- PeteCresswell |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
"Variable not defined" error for form that does not initially exist... | Excel Programming | |||
STOP MACRO IF CELL "A1" IS EMPTY OR SHEET DOESN´T EXIST | Excel Programming | |||
Questionnaire sheet: Select "yes" or "no," and only one can be selected | Excel Worksheet Functions | |||
Suppress "Disable/Enable Macros" and Query Refresh dialog on open | Excel Programming | |||
Getting "compile error" "method or data member not found" on reinstall | Excel Programming |