LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,549
Default Options for error output in custom Excel functions

Validate the arguments before use and keep any
error messages short would be my approach.
'--
Function Sludge(postposition as Double, _
speedrating as Double, _
lastouting as String) as Variant
On Error GoTo Toxic

Select Case True
Case postposition 21
Sludge = "Check Post Position"
Exit Function
Case speedrating < 0
Sludge = "Verify Speed Rating"
Exit Function
Case Len(lastouting) 255
Sludge = "One Word Only Please"
Exit Function
End Select

'Do something in the function

Sludge = "Faster Horses Required"
Exit Function
Toxic:
Sludge = "Function Error " & Err.Number
End Function
--
Jim Cone
Portland, Oregon USA
http://www.realezsites.com/bus/primitivesoftware
(Excel Add-ins / Excel Programming)



"Jack Hoxley [MVP]" <Jack Hoxley
wrote in message
Afternoon all,

I've been doing some research into reporting errors in custom Excel
functions to the end user today. I've not really come up with any promising
leads so I was hoping someone frequenting this newsgroup might be able to
point me in the right direction :-)

The primary interest is in increasing the usability of our addin. Currently
it just dumps out a textual error message into the cell (repeated accordingly
if the output is an array) but this looks plain ugly to say the least.
Something friendly and ideally self-explanatory would make everyone happy and
stop the phones ringing off the hook whenever a scary error message appears!

What i'm wondering about is any standardised options for error pop-ups,
highlighting, help file linking, auto-complete type hints as to which
parameter is wrong etc...etc...

Maybe something like the standard Excel feature where it draws a small green
triangle in the upper-left corner that then shows a pop-up menu with details
on the formula error/warning.

Any suggestions?

Thanks in advance,
Jack
 
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 Excel VBA: sending output data table to created .csv file +append Options Mike Excel Discussion (Misc queries) 1 December 10th 11 12:39 PM
Error when saving Excel output file Helge's Excel Programming 2 October 20th 06 03:56 PM
formula for custom output TUNGANA KURMA RAJU Excel Discussion (Misc queries) 0 November 15th 05 04:36 AM
Javascript functions in Excel output page Ant276 Excel Programming 0 November 11th 04 10:28 PM
Help with #Value error when calling custom functions Carlos Galvez Excel Programming 1 September 9th 04 10:42 PM


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

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"