Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 8
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35,218
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 8
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35,218
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 8
Default Help 'Number Stored as Text Error' !!!


Excellent, thanks Dave.

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
Number stored as text Ana via OfficeKB.com Excel Worksheet Functions 3 October 14th 09 01:05 PM
Number stored as text GKW in GA Excel Discussion (Misc queries) 3 August 14th 08 05:53 PM
How do I ignore the "Number stored as text" error message permane. reston33 Excel Discussion (Misc queries) 2 March 28th 07 02:59 AM
Number Stored as text Error Torero Excel Worksheet Functions 2 December 1st 06 01:28 PM
Number stored as text Andrew Clark Excel Discussion (Misc queries) 1 November 8th 05 10:25 PM


All times are GMT +1. The time now is 03:50 AM.

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"