Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default suppress 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


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 983
Default suppress system msgs in excel 2k

application.DisplayAlerts = False
is the line of code that you are looking for. Turn alerts off at the
beginning of the procedure and back on again at the end. When you use
something like this is is a good idea to add in some error handling to turn
the alerts back on in case an error occures.

sub whatever
on error goto ErrorHandler
'do some stuff
...
application.DisplayAlerts = true
Exit Sub
ErrorHandler:
application.DisplayAlerts = true
end sub

Hope this helps...
"dkyle" 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



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 983
Default suppress system msgs in excel 2k

Sorry. Just before do some stuff I meant to include
application.DisplayAlerts = False

"Jim Thomlinson" wrote:

application.DisplayAlerts = False
is the line of code that you are looking for. Turn alerts off at the
beginning of the procedure and back on again at the end. When you use
something like this is is a good idea to add in some error handling to turn
the alerts back on in case an error occures.

sub whatever
on error goto ErrorHandler
'do some stuff
...
application.DisplayAlerts = true
Exit Sub
ErrorHandler:
application.DisplayAlerts = true
end sub

Hope this helps...
"dkyle" 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



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
How do I open an Excel file on XP system, saved on a Vista system JLS7 Excel Discussion (Misc queries) 3 December 2nd 08 04:21 AM
Error Msgs? reno Excel Discussion (Misc queries) 1 March 17th 06 05:36 PM
Formula Pop Up Error Msgs TW Excel Discussion (Misc queries) 1 April 19th 05 01:51 PM
excel causing system to be in low system resource inenewbl Excel Discussion (Misc queries) 0 April 5th 05 04:11 PM
Suppressing or trapping system msgs in excel 2k mike Excel Programming 1 November 17th 04 01:07 AM


All times are GMT +1. The time now is 03:30 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"