Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Help 'Number Stored as Text Error' !!!
I desperately need some help,
I have a VB app that populates a column with product numbers that are numeric but are right filled with zeroes. ie. "006876". If I set the cell value to "'006876" it works but I get the pesky green triangle with a "number stored as text error". I don't want this, I simply want it to be stored as a normal string. I know I can click the button and select "ignore error", but I don't want my users to have to do this every time. Is there a way I can say " range.ignoreerror = true " or something like that. Any help would be much appreciated. Thanks, Peter |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Help 'Number Stored as Text Error' !!!
How about just turning that check off.
Tools|options|error checking tab Uncheck all the ones you don't want. Peter wrote: I desperately need some help, I have a VB app that populates a column with product numbers that are numeric but are right filled with zeroes. ie. "006876". If I set the cell value to "'006876" it works but I get the pesky green triangle with a "number stored as text error". I don't want this, I simply want it to be stored as a normal string. I know I can click the button and select "ignore error", but I don't want my users to have to do this every time. Is there a way I can say " range.ignoreerror = true " or something like that. Any help would be much appreciated. Thanks, Peter -- Dave Peterson |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Help 'Number Stored as Text Error' !!!
Yes, i've done that, but I don't think my application should be taking
control of the user environment in excel. Other apps or the user may want that check in other circumstances . Any more ideas? Peter |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
Help 'Number Stored as Text Error' !!!
How about just resetting those errors:
Option Explicit Sub testme01() Dim myCell As Range Dim myRng As Range Dim wks As Worksheet For Each wks In ActiveWorkbook.Worksheets With wks Set myRng = Nothing On Error Resume Next Set myRng = .Cells.SpecialCells(xlCellTypeConstants, xlTextValues) On Error GoTo 0 If myRng Is Nothing Then 'do nothing Else For Each myCell In myRng.Cells With myCell.errors(xlNumberAsText) If .Value = True Then .Ignore = True End If End With Next myCell End If End With Next wks End Sub Peter wrote: Yes, i've done that, but I don't think my application should be taking control of the user environment in excel. Other apps or the user may want that check in other circumstances . Any more ideas? Peter -- Dave Peterson |
#5
Posted to microsoft.public.excel.programming
|
|||
|
|||
Help 'Number Stored as Text Error' !!!
Excellent, thanks Dave. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Number stored as text | Excel Worksheet Functions | |||
Number stored as text | Excel Discussion (Misc queries) | |||
How do I ignore the "Number stored as text" error message permane. | Excel Discussion (Misc queries) | |||
Number Stored as text Error | Excel Worksheet Functions | |||
Number stored as text | Excel Discussion (Misc queries) |