Home |
Search |
Today's Posts |
|
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
#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
Posted to microsoft.public.excel.programming
|
|||
|
|||
#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
Posted to microsoft.public.excel.programming
|
|||
|
|||
#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 |
Display Modes | |
|
|