Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
Vick
 
Posts: n/a
Default MsgBox when an Error occurs

Is there a way that I can have a message box display when an error is
received while running a Macro?

Vick
  #2   Report Post  
Posted to microsoft.public.excel.misc
Bob Phillips
 
Posts: n/a
Default MsgBox when an Error occurs

You need to trap the error and display the message. Example

Sub Test()
On Error Goto errHandler
'more code
Exit Sub

errHandler:
Msgbox "some message"
End Sub

--

HTH

RP
(remove nothere from the email address if mailing direct)


"Vick" wrote in message
...
Is there a way that I can have a message box display when an error is
received while running a Macro?

Vick



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
MsgBox compile error in Excell Jerry Dyben Excel Discussion (Misc queries) 1 October 11th 05 07:04 PM
Compile error for MsgBox copied from Microsoft training example? Jerry Dyben Excel Discussion (Misc queries) 2 October 11th 05 05:48 AM
MsgBox with condition and showing details viddom Excel Worksheet Functions 2 August 17th 05 12:38 PM
display cell value in msgbox formatted as % rgarber50 Excel Discussion (Misc queries) 5 July 10th 05 03:27 PM
Msgbox Wildman Excel Worksheet Functions 1 April 26th 05 04:57 AM


All times are GMT +1. The time now is 06:47 AM.

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"