PC Review


Reply
Thread Tools Rate Thread

Displaying programatically worksheet errors messages in a cell

 
 
Tom
Guest
Posts: n/a
 
      19th Jan 2008
Hi,
I'm asking you about this maybe simple matter of how to display
worksheets error messages in a cell such as #N/A or incorrect args and
others programatically from Excel VBA.
I just wrote a simple user - defined function and in case for exapmle
the arguments passed to this function exceed bounds I would like the
function to display in the cell where the function is entered standard
excel worksheet error message. Has it something to do with:
Err.raise Error(errNumber) ? (but what errNumbers are for what
errors ?)
Could someone drop a few lines of code ?
Thanks
Tom
 
Reply With Quote
 
 
 
 
Tom
Guest
Posts: n/a
 
      19th Jan 2008
Hi, that's me again

Lucky must I be because after ploughing throug Excel VBA help I
finally found something.
the non-elegant solution seems to be:

Function nameOfFun(args...)
nameOfFun=Evaluate(strin) where strin= {"#VALUE!" | "#REF!" | "#DIV/
0!" | "#NUM!" |
"#NAME?" | "#NULL!" | "#N/A" } as String is a text representing one of
the above values
End Function

Luckily I suddenly remembered Eval or something like that function
from probably Jscript and it seems to do the trick.

Regards
Tom
 
Reply With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Displaying the name of a worksheet in a cell ? NickTheBatMan Microsoft Excel Discussion 1 2nd Feb 2011 04:10 PM
Errors displaying Outlook messages in reading pane =?Utf-8?B?S2FuZ2E=?= Microsoft Outlook Installation 0 1st Jun 2007 07:05 AM
Displaying worksheet name in cell =?Utf-8?B?QWRyaWFu?= Microsoft Excel Misc 4 27th Oct 2005 08:27 PM
Displaying messages/errors to users. Opinions? NewsMonkey Microsoft ASP .NET 3 29th Mar 2004 01:45 PM
Handling errors - displaying custom error messages Marc Scheuner [MVP ADSI] Microsoft ADO .NET 0 2nd Jul 2003 09:02 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 05:50 PM.