Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Error'9': Can I create a msgbox for the user?
I am getting an Error '9'. I know why this is happening, but the user will
not. Is there a way that I can show a msg box instead of the errorcode? |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Error'9': Can I create a msgbox for the user?
Dave,
If you have error handlers in your code, you'd be able to show a different message for the user. for example: Sub test() On Error GoTo Error_Handler Dim i(2) As Integer i(3) = 3 Exit Sub Error_Handler: Select Case Err.Number Case 9: MsgBox "Subscript out of range!" Case Else: MsgBox "An unexpected error occurred!" End Select End Sub -- Hope that helps. Vergel Adriano "Dave M" wrote: I am getting an Error '9'. I know why this is happening, but the user will not. Is there a way that I can show a msg box instead of the errorcode? |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Run-time error'9' Subscript out of range. How do I sort? Please | Excel Discussion (Misc queries) | |||
How to create a MsgBox to alert user an invalid entry has been mad | Excel Programming | |||
User defined msgbox | Excel Programming | |||
allow user to change workbook while in Msgbox or InputBox | Excel Programming | |||
MsgBox and User Input | Excel Programming |