ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Suppressing or trapping system msgs in excel 2k (https://www.excelbanter.com/excel-programming/317044-suppressing-trapping-system-msgs-excel-2k.html)

mike

Suppressing or trapping system msgs in excel 2k
 
I've automated a timesheet process doing data collection via Access 2k,
building
an excel 2k workbook via VBA containing individual timesheets which are then
printed.
I've used a .xlt template with one worksheet which I duplicate and rename
for each employee.

At the end I delete the templete worksheet, which pops up a Excel system msg
'the selected sheet(s) will be permanently deleted' with cmd btns 'ok or
cancel'...

The VB 'on error' keyword isn't being triggered as I have tried 'on error
resume next'
or forcing an error handler and 'displayalerts = false' without success.

Is there a way to redirect/control this system msg as it is rather confusing
to the end user.

Any suggestion would be greatly appreciated!

Thanks in advance. Doug





Gord Dibben

Suppressing or trapping system msgs in excel 2k
 
'displayalerts = false' must be changed

Application.DisplayAlerts = False
ActiveWindow.SelectedSheets.Delete
Application.DisplayAlerts = True

Gord Dibben Excel MVP

On Tue, 16 Nov 2004 22:56:44 GMT, "mike" wrote:

I've automated a timesheet process doing data collection via Access 2k,
building
an excel 2k workbook via VBA containing individual timesheets which are then
printed.
I've used a .xlt template with one worksheet which I duplicate and rename
for each employee.

At the end I delete the templete worksheet, which pops up a Excel system msg
'the selected sheet(s) will be permanently deleted' with cmd btns 'ok or
cancel'...

The VB 'on error' keyword isn't being triggered as I have tried 'on error
resume next'
or forcing an error handler and 'displayalerts = false' without success.

Is there a way to redirect/control this system msg as it is rather confusing
to the end user.

Any suggestion would be greatly appreciated!

Thanks in advance. Doug






All times are GMT +1. The time now is 06:23 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com