Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
Tom Tom is offline
external usenet poster
 
Posts: 12
Default Displaying programatically worksheet errors messages in a cell

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
  #2   Report Post  
Posted to microsoft.public.excel.programming
Tom Tom is offline
external usenet poster
 
Posts: 12
Default Displaying programatically worksheet errors messages in a cell

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
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
When I open the Excel, I get the errors messages sa Excel Discussion (Misc queries) 0 October 13th 06 03:57 PM
Displaying Messages BillCPA Excel Discussion (Misc queries) 1 December 9th 04 06:03 PM
Displaying messages Claudia[_4_] Excel Programming 3 June 24th 04 02:15 AM
Programatically Displaying Office Assistant Balloon John[_57_] Excel Programming 1 September 16th 03 10:57 PM
Displaying error messages Chip Pearson Excel Programming 1 August 29th 03 10:52 AM


All times are GMT +1. The time now is 07:28 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"