#1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 102
Default #NUM!

I use the following code for a user form text box value:

Me.TextBox16.Value = Sheets("Sheet1").Range("aj34").Text

Trouble is the cell "aj34" is part of an array formula and can often
return:"#NUM!"
Is there any way I can get a blank in my text box even when the cell returns
"#NUM!".
As the cell is part of an array I don't think I can stop the "#NUM!" coming
up on the worksheet.

gregorK


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,236
Default #NUM!

How about something like:

With Sheets("Sheet1").Range("aj34")
Me.TextBox16.Text = IIf(IsError(.Value), "", .Value)
End With

--
Rob van Gelder - http://www.vangelder.co.nz/excel


"gregork" wrote in message
...
I use the following code for a user form text box value:

Me.TextBox16.Value = Sheets("Sheet1").Range("aj34").Text

Trouble is the cell "aj34" is part of an array formula and can often
return:"#NUM!"
Is there any way I can get a blank in my text box even when the cell

returns
"#NUM!".
As the cell is part of an array I don't think I can stop the "#NUM!"

coming
up on the worksheet.

gregorK




  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default #NUM!

Hi Gregor,

You can use an if and iserror statement on your worksheet to test i
your array formula returns an error. Where it does substitute th
system error message for your user defined error message.

ie: =if(iserror(array_formula),"",array_formula)

This is an easier way than trying to manipulate through code.

HTH

Cheers,

B

--
Message posted from http://www.ExcelForum.com

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



All times are GMT +1. The time now is 11:40 PM.

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"