Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 110
Default "End" Button for Error Messages

Is there a way in VBA to display a message box that shows the just the
following:

-- Error Code
-- Error Message
-- An "End" button

I want to use an "End" button to force an immediate stop to the application.
I've experimented with the "OK" button and error trapping but, due to the
way my application is built, the code seems to continue to loop even after an
error is trapped.

Thank you for your help.

--
Steph
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 110
Default "End" Button for Error Messages

Hello Steph

There is no such End button in common Excel message boxes. You could use a
userform though.
But since your are having trouble in ending the sub when an error occurs,
envisage using the End instruction, eg:
On Error Goto ErrTrap
'......
Exit Sub

ErrTrap:
Msgbox "Error number " & Err.Number & " " & Err.Description
End
End Sub

HTH
Cordially
Pascal

"Steph" a écrit dans le message de news:
...
Is there a way in VBA to display a message box that shows the just the
following:

-- Error Code
-- Error Message
-- An "End" button

I want to use an "End" button to force an immediate stop to the
application.
I've experimented with the "OK" button and error trapping but, due to the
way my application is built, the code seems to continue to loop even after
an
error is trapped.

Thank you for your help.

--
Steph



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
using % button gives error "percent style not found" Can I reset? Light Excel Discussion (Misc queries) 3 March 16th 06 12:18 PM
What is Error "Method "Paste" of object "_Worksheet" failed? vat Excel Programming 7 February 17th 06 08:05 PM
Web Queries - bypassing "no connection / data available" messages. Matt Lawson[_4_] Excel Programming 0 December 13th 04 07:43 PM
Error "Permission denied" when printing Web Browser control from button on userform, Charles Jordan Excel Programming 0 July 8th 04 04:19 PM
Getting "compile error" "method or data member not found" on reinstall Bp Excel Programming 1 April 23rd 04 04:42 PM


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

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

About Us

"It's about Microsoft Excel"